test_class.declarator: mockCorsRegistry
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private CorsRegistry mockCorsRegistry;
test_class.type: CorsRegistry
test_class.var_name: mockCorsRegistry
test_class.declarator: mockCorsRegistration
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private CorsRegistration mockCorsRegistration;
test_class.type: CorsRegistration
test_class.var_name: mockCorsRegistration
test_class.declarator: systemConfig
test_class.modifier: private
test_class.original_string: private SystemConfig systemConfig;
test_class.type: SystemConfig
test_class.var_name: systemConfig
test_class.file: application/confagrid-webapp/src/test/java/com/aleggeup/confagrid/config/SystemConfigTest.java
test_class.identifier: SystemConfigTest
test_case.body: @Test
      public void testCorsRegistration() {
          Mockito.when(mockCorsRegistration.allowedOrigins(SystemConfig.CORS_ALLOWED_ORIGINS))
              .thenReturn(mockCorsRegistration);
          Mockito.when(mockCorsRegistry.addMapping(SystemConfig.CORS_MAPPING)).thenReturn(mockCorsRegistration);
          Mockito
              .when(mockCorsRegistration
                  .allowedMethods(RequestMethod.GET.name(), RequestMethod.POST.name(), RequestMethod.PUT.name()))
              .thenReturn(mockCorsRegistration);
          Mockito.when(mockCorsRegistration.allowedHeaders("*")).thenReturn(mockCorsRegistration);
          Mockito.when(mockCorsRegistration.exposedHeaders(JwtFilter.HEADER_CLAIMS, JwtFilter.HEADER_CLAIMS_SUBJECT))
              .thenReturn(mockCorsRegistration);
  
          final WebMvcConfigurer configurer = systemConfig.corsConfigurer();
          configurer.addCorsMappings(mockCorsRegistry);
  
          Mockito.verify(mockCorsRegistry).addMapping(SystemConfig.CORS_MAPPING);
          Mockito.verify(mockCorsRegistration).allowedOrigins(SystemConfig.CORS_ALLOWED_ORIGINS);
          Mockito.verify(mockCorsRegistration)
              .allowedMethods(RequestMethod.GET.name(), RequestMethod.POST.name(), RequestMethod.PUT.name());
          Mockito.verify(mockCorsRegistration).allowedHeaders("*");
          Mockito.verify(mockCorsRegistration).exposedHeaders(JwtFilter.HEADER_CLAIMS, JwtFilter.HEADER_CLAIMS_SUBJECT);
      }
test_case.class_method_signature: SystemConfigTest.testCorsRegistration()
test_case.full_signature: @Test public void testCorsRegistration()
test_case.identifier: testCorsRegistration
test_case.invocations: thenReturn when allowedOrigins thenReturn when addMapping thenReturn when allowedMethods name name name thenReturn when allowedHeaders thenReturn when exposedHeaders corsConfigurer addCorsMappings addMapping verify allowedOrigins verify allowedMethods verify name name name allowedHeaders verify exposedHeaders verify
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCorsRegistration()
focal_class.declarator: CORS_MAPPING = "/**"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String CORS_MAPPING = "/**";
focal_class.type: String
focal_class.var_name: CORS_MAPPING
focal_class.declarator: CORS_ALLOWED_ORIGINS = "http://localhost:4200"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String CORS_ALLOWED_ORIGINS = "http://localhost:4200";
focal_class.type: String
focal_class.var_name: CORS_ALLOWED_ORIGINS
focal_class.file: application/confagrid-webapp/src/main/java/com/aleggeup/confagrid/config/SystemConfig.java
focal_class.identifier: SystemConfig
focal_class.class_method_signature: SystemConfig.corsConfigurer()
focal_class.full_signature: @Bean public WebMvcConfigurer corsConfigurer()
focal_class.identifier: corsConfigurer
focal_class.modifiers: @Bean public
focal_class.parameters: ()
focal_class.return: WebMvcConfigurer
focal_class.signature: WebMvcConfigurer corsConfigurer()
focal_method.body: @Bean
      public WebMvcConfigurer corsConfigurer() {
          return new WebMvcConfigurer() {
              @Override
              public void addCorsMappings(final CorsRegistry registry) {
                  registry.addMapping(CORS_MAPPING)
                      .allowedOrigins(CORS_ALLOWED_ORIGINS)
                      .allowedMethods(RequestMethod.GET.name(), RequestMethod.POST.name(), RequestMethod.PUT.name())
                      .allowedHeaders("*")
                      .exposedHeaders(JwtFilter.HEADER_CLAIMS, JwtFilter.HEADER_CLAIMS_SUBJECT);
              }
          };
      }
focal_method.class_method_signature: SystemConfig.corsConfigurer()
focal_method.full_signature: @Bean public WebMvcConfigurer corsConfigurer()
focal_method.identifier: corsConfigurer
focal_method.invocations: exposedHeaders allowedHeaders allowedMethods allowedOrigins addMapping name name name
focal_method.modifiers: @Bean public
focal_method.parameters: ()
focal_method.return: WebMvcConfigurer
focal_method.signature: WebMvcConfigurer corsConfigurer()