public void testRedirectWithCookie() throws Exception {
final HttpHost target = getServerHttp();
this.localServer.register("*", new BasicRedirectService());
final CookieStore cookieStore = new BasicCookieStore();
final BasicClientCookie cookie = new BasicClientCookie("name", "value");
cookie.setDomain(target.getHostName());
cookie.setPath("/");
cookieStore.addCookie(cookie);
final HttpClientContext context = HttpClientContext.create();
context.setCookieStore(cookieStore);
final HttpGet httpget = new HttpGet("/oldlocation/");