CsrfGateFilter implements Filter { public void setAccessDeniedHandler( AccessDeniedHandler accessDeniedHandler ) { this.innerCsrfFilter.setAccessDeniedHandler( accessDeniedHandler ); } CsrfGateFilter( CsrfTokenRepository csrfTokenRepository ); void setAccessDeniedHandler( AccessDeniedHandler accessDeniedHandler ); @Override void init( FilterConfig filterConfig ); @Override void doFilter( ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain ); @Override void destroy();  }
@Test public void testSetAccessDeniedHandler() throws Exception { this.csrfGateFilter.setAccessDeniedHandler( Mockito.mock ( AccessDeniedHandler.class ) ); }