ServletContext context = EasyMock.createNiceMock( ServletContext.class );
EasyMock.expect( context.getServletContextName() ).andReturn( "test-cluster-name" ).anyTimes();
EasyMock.expect( context.getInitParameter( "test-init-param-name" ) ).andReturn( "test-init-param-value" ).anyTimes();
EasyMock.expect( context.getAttribute( UrlRewriteServletContextListener.PROCESSOR_ATTRIBUTE_NAME ) ).andReturn( rewriter ).anyTimes();
FilterConfig config = EasyMock.createNiceMock( FilterConfig.class );
EasyMock.expect( config.getServletContext() ).andReturn( context ).anyTimes();
HttpServletRequest request = EasyMock.createNiceMock( HttpServletRequest.class );
HttpServletResponse response = EasyMock.createNiceMock( HttpServletResponse.class );
EasyMock.replay( rewriter, context, config, request, response );