@Test public void intercept() { String expectedValueAfterReplacement = "https: ResponseHeaderTransform headerTransform = ResponseHeaderTransform.valueByName(StringLiteral.of(HttpHeaders.LOCATION), StringLiteral.of(expectedValueAfterReplacement)); Multimap<String, String> headers = ImmutableMultimap.of(HttpHeaders.LOCATION, "https: String actualValueAfterReplacement = testIntercept(headers, headerTransform, HttpHeaders.LOCATION); assertEquals("location header value", expectedValueAfterReplacement, actualValueAfterReplacement); }
@Override public HttpRespondable intercept(ParsedRequest parsedRequest, HttpRespondable httpRespondable) { if (isAnyTransformRequired(httpRespondable)) { return new HeaderTransformRespondableWrapper(httpRespondable); } return httpRespondable; }
HeaderTransformInterceptor implements ResponseInterceptor { @Override public HttpRespondable intercept(ParsedRequest parsedRequest, HttpRespondable httpRespondable) { if (isAnyTransformRequired(httpRespondable)) { return new HeaderTransformRespondableWrapper(httpRespondable); } return httpRespondable; } }
HeaderTransformInterceptor implements ResponseInterceptor { @Override public HttpRespondable intercept(ParsedRequest parsedRequest, HttpRespondable httpRespondable) { if (isAnyTransformRequired(httpRespondable)) { return new HeaderTransformRespondableWrapper(httpRespondable); } return httpRespondable; } HeaderTransformInterceptor(VhsReplayManagerConfig config, ResponseHeaderTransform headerTransform); }
HeaderTransformInterceptor implements ResponseInterceptor { @Override public HttpRespondable intercept(ParsedRequest parsedRequest, HttpRespondable httpRespondable) { if (isAnyTransformRequired(httpRespondable)) { return new HeaderTransformRespondableWrapper(httpRespondable); } return httpRespondable; } HeaderTransformInterceptor(VhsReplayManagerConfig config, ResponseHeaderTransform headerTransform); @Override HttpRespondable intercept(ParsedRequest parsedRequest, HttpRespondable httpRespondable); }
HeaderTransformInterceptor implements ResponseInterceptor { @Override public HttpRespondable intercept(ParsedRequest parsedRequest, HttpRespondable httpRespondable) { if (isAnyTransformRequired(httpRespondable)) { return new HeaderTransformRespondableWrapper(httpRespondable); } return httpRespondable; } HeaderTransformInterceptor(VhsReplayManagerConfig config, ResponseHeaderTransform headerTransform); @Override HttpRespondable intercept(ParsedRequest parsedRequest, HttpRespondable httpRespondable);  }