### Question:
WroContextFilter implements Filter { public final void doFilter(final ServletRequest req, final ServletResponse res, final FilterChain chain) throws IOException, ServletException { final HttpServletRequest request = (HttpServletRequest) req; final HttpServletResponse response = (HttpServletResponse) res; final String originalCorrelationId = Context.isContextSet() ? Context.getCorrelationId() : null; Context.set(Context.webContext(request, response, this.filterConfig), getWroConfiguration()); final String correlationId = Context.getCorrelationId(); try { chain.doFilter(request, response); } finally { Context.setCorrelationId(correlationId); Context.unset(); if (originalCorrelationId != null) { Context.setCorrelationId(originalCorrelationId); } } }  void init(final FilterConfig filterConfig); final void doFilter(final ServletRequest req, final ServletResponse res, final FilterChain chain); void destroy();  }### Answer:
@Test public void shouldInitializeContextForChainedFilters() throws Exception { doAnswer(new Answer<Void>() { public Void answer(InvocationOnMock invocation) throws Throwable { assertTrue(Context.isContextSet()); return null; } }).when(mockFilterChain).doFilter(Mockito.any(HttpServletRequest.class), Mockito.any(HttpServletResponse.class)); victim.doFilter(mockRequest, mockResponse, mockFilterChain); verify(mockFilterChain, times(1)).doFilter(Mockito.any(HttpServletRequest.class), Mockito.any(HttpServletResponse.class)); assertFalse(Context.isContextSet()); }