use of org.springframework.web.testfixture.servlet.MockFilterChain in project spring-framework by spring-projects.
the class ServletUriComponentsBuilderTests method adaptFromForwardedHeaders.
// SPR-16668
private HttpServletRequest adaptFromForwardedHeaders(HttpServletRequest request) throws Exception {
MockFilterChain chain = new MockFilterChain();
new ForwardedHeaderFilter().doFilter(request, new MockHttpServletResponse(), chain);
return (HttpServletRequest) chain.getRequest();
}
Aggregations