client.getParams().setBooleanParameter(ClientPNames.ALLOW_CIRCULAR_REDIRECTS, true);
client.getParams().setIntParameter(ClientPNames.MAX_REDIRECTS, 5);
HttpGet httpget = new HttpGet("/circular-oldlocation/");
RoutedRequest request = new RoutedRequest.Impl(httpget, getDefaultRoute());
try {
client.execute(request);
fail("RedirectException exception should have been thrown");
} catch (RedirectException e) {
// expected