### Question:
DefaultRedirectStrategy implements RedirectStrategy { protected URI createLocationURI(final String location) throws ProtocolException { try { final URIBuilder b = new URIBuilder(new URI(location).normalize()); final String host = b.getHost(); if (host != null) { b.setHost(host.toLowerCase(Locale.ROOT)); } if (b.isPathEmpty()) { b.setPathSegments(""); } return b.build(); } catch (final URISyntaxException ex) { throw new ProtocolException("Invalid redirect URI: " + location, ex); } }  @Override boolean isRedirected(
            final HttpRequest request,
            final HttpResponse response,
            final HttpContext context); @Override URI getLocationURI(
            final HttpRequest request,
            final HttpResponse response,
            final HttpContext context); static final DefaultRedirectStrategy INSTANCE; }### Answer:
@Test public void testCreateLocationURI() throws Exception { final DefaultRedirectStrategy redirectStrategy = new DefaultRedirectStrategy(); Assert.assertEquals("http: redirectStrategy.createLocationURI("http: }
@Test(expected=ProtocolException.class) public void testCreateLocationURIInvalid() throws Exception { final DefaultRedirectStrategy redirectStrategy = new DefaultRedirectStrategy(); redirectStrategy.createLocationURI(":::::::"); }