public void testPostRedirect() throws IOException {
String host = this.server.getLocalAddress();
int port = this.server.getLocalPort();
this.server.setHttpService(new BasicRedirectService(host, port));
PostMethod httppost = new PostMethod("/oldlocation/");
httppost.setRequestEntity(new StringRequestEntity("stuff"));
try {
this.client.executeMethod(httppost);
assertEquals(HttpStatus.SC_MOVED_TEMPORARILY, httppost.getStatusCode());
assertEquals("/oldlocation/", httppost.getPath());
assertEquals(new URI("/oldlocation/", false), httppost.getURI());