### Question:
PageRedirectionFilter extends ZuulFilter implements RoutedServicesUser { @Override public boolean shouldFilter() { RequestContext context = RequestContext.getCurrentContext(); int status = context.getResponseStatusCode(); return HttpStatus.valueOf(status).is3xxRedirection(); } PageRedirectionFilter(DiscoveryClient discovery, GatewayConfigProperties gatewayConfigProperties); @Override boolean shouldFilter(); @Override String filterType(); @Override int filterOrder(); @Override Object run(); @Override void addRoutedServices(String serviceId, RoutedServices routedServices);  }### Answer:
@Test void givenStatusCode302_whenShouldFilterCalled_thenPassFromFilter() { final RequestContext ctx = RequestContext.getCurrentContext(); ctx.setResponseStatusCode(302); assertTrue(filter.shouldFilter()); }