### Question:
AuthorizationResetFilter implements Filter { @Override public void doFilter( ServletRequest request, ServletResponse response, FilterChain chain ) throws IOException, ServletException { try { chain.doFilter( request, response ); } finally { authorizationContext.resetAuthorization(); } } AuthorizationResetFilter( @Nonnull AuthorizationContext authorizationContext ); @Override void init( FilterConfig filterConfig ); @Override void destroy(); @Override void doFilter( ServletRequest request, ServletResponse response, FilterChain chain );  }### Answer:
@Test public void doFilter() throws IOException, ServletException { filter.doFilter( request, response, filterChain ); final InOrder inOrder = Mockito.inOrder( filterChain, authorizationContext ); inOrder.verify( filterChain ).doFilter( Mockito.same( request ), Mockito.same( response ) ); inOrder.verify( authorizationContext ).resetAuthorization(); }