### Question:
LocationHeaderFilter extends GenericHeapObject implements Filter { public void setBaseURI(final Expression<String> baseURI) { this.baseURI = baseURI; }  void setBaseURI(final Expression<String> baseURI); @Override Promise<Response, NeverThrowsException> filter(final Context context,
                                                          final Request request,
                                                          final Handler next);  }### Answer:
@Test public void caseChangeSchemeHostAndPort() throws Exception { String expectedResult = "https: URI testRedirectionURI = new URI("http: LocationHeaderFilter filter = new LocationHeaderFilter(); filter.setBaseURI(Expression.valueOf("https: callFilter(filter, testRedirectionURI, expectedResult); }
@Test public void caseChangeHost() throws Exception { String expectedResult = "http: URI testRedirectionURI = new URI("http: LocationHeaderFilter filter = new LocationHeaderFilter(); filter.setBaseURI(Expression.valueOf("http: callFilter(filter, testRedirectionURI, expectedResult); }
@Test public void caseChangePort() throws Exception { String expectedResult = "http: URI testRedirectionURI = new URI("http: LocationHeaderFilter filter = new LocationHeaderFilter(); filter.setBaseURI(Expression.valueOf("http: callFilter(filter, testRedirectionURI, expectedResult); }
@Test public void caseChangeScheme() throws Exception { String expectedResult = "https: URI testRedirectionURI = new URI("http: LocationHeaderFilter filter = new LocationHeaderFilter(); filter.setBaseURI(Expression.valueOf("https: callFilter(filter, testRedirectionURI, expectedResult); }
@Test public void caseNoChange() throws Exception { String expectedResult = "http: URI testRedirectionURI = new URI("http: LocationHeaderFilter filter = new LocationHeaderFilter(); filter.setBaseURI(Expression.valueOf("http: callFilter(filter, testRedirectionURI, expectedResult); }
@Test public void caseChangeHostWithEncodedLocation() throws Exception { String expectedResult = "http: URI testRedirectionURI = new URI("http: LocationHeaderFilter filter = new LocationHeaderFilter(); filter.setBaseURI(Expression.valueOf("http: callFilter(filter, testRedirectionURI, expectedResult); }