@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(); }
@Override public void doFilter( ServletRequest request, ServletResponse response, FilterChain chain ) throws IOException, ServletException { try { chain.doFilter( request, response ); } finally { authorizationContext.resetAuthorization(); } }
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 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 ); }
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 ); }
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 );  }