test_class.declarator: crossDomainFilter
test_class.modifier: private
test_class.original_string: private CrossDomainFilter crossDomainFilter;
test_class.type: CrossDomainFilter
test_class.var_name: crossDomainFilter
test_class.file: micro-cors/src/test/java/com/oath/micro/server/web/cors/CrossDomainFilterTest.java
test_class.identifier: CrossDomainFilterTest
test_case.body: @Test
  	public void testFilter() throws IOException, ServletException {
  
  		ServletRequest request = mock(ServletRequest.class);
  		HttpServletResponse response = mock(HttpServletResponse.class);
  		FilterChain filterChain = mock(FilterChain.class);
  
  		crossDomainFilter.doFilter(request, response, filterChain);
  
  		InOrder inOrder = Mockito.inOrder(response, filterChain);
  
  		inOrder.verify(response, times(1)).addHeader("Access-Control-Allow-Origin", "*");
  		inOrder.verify(response, times(1)).addHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT");
  		inOrder.verify(response, times(1)).addHeader("Access-Control-Allow-Headers", "X-Requested-With, Content-Type, X-Codingpedia");
  
  		inOrder.verify(filterChain, times(1)).doFilter(request, response);
  
  	}
test_case.class_method_signature: CrossDomainFilterTest.testFilter()
test_case.full_signature: @Test public void testFilter()
test_case.identifier: testFilter
test_case.invocations: mock mock mock doFilter inOrder addHeader verify times addHeader verify times addHeader verify times doFilter verify times
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testFilter()
focal_class.file: micro-cors/src/main/java/com/oath/micro/server/web/cors/CrossDomainFilter.java
focal_class.identifier: CrossDomainFilter
focal_class.interfaces: implements Filter
focal_class.class_method_signature: CrossDomainFilter.init(FilterConfig filterConfig)
focal_class.full_signature: @Override public void init(FilterConfig filterConfig)
focal_class.identifier: init
focal_class.modifiers: @Override public
focal_class.parameters: (FilterConfig filterConfig)
focal_class.return: void
focal_class.signature: void init(FilterConfig filterConfig)
focal_class.class_method_signature: CrossDomainFilter.doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
focal_class.full_signature: @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
focal_class.identifier: doFilter
focal_class.modifiers: @Override public
focal_class.parameters: (ServletRequest request, ServletResponse response, FilterChain chain)
focal_class.return: void
focal_class.signature: void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
focal_class.class_method_signature: CrossDomainFilter.destroy()
focal_class.full_signature: @Override public void destroy()
focal_class.identifier: destroy
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void destroy()
focal_method.body: @Override
  	public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
  		HttpServletResponse resp = (HttpServletResponse) response;
  		resp.addHeader("Access-Control-Allow-Origin", "*");
  		resp.addHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT");
  		resp.addHeader("Access-Control-Allow-Headers", "X-Requested-With, Content-Type, X-Codingpedia");
  		chain.doFilter(request, response);
  	}
focal_method.class_method_signature: CrossDomainFilter.doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
focal_method.full_signature: @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
focal_method.identifier: doFilter
focal_method.invocations: addHeader addHeader addHeader doFilter
focal_method.modifiers: @Override public
focal_method.parameters: (ServletRequest request, ServletResponse response, FilterChain chain)
focal_method.return: void
focal_method.signature: void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)