GetMethod getMethod = new GetMethod(postURILocation);
try {
client.executeMethod(getMethod);
assertEquals(200, getMethod.getStatusCode());
Comment c =
(Comment)JAXBContext.newInstance(Comment.class.getPackage().getName())
.createUnmarshaller().unmarshal(getMethod.getResponseBodyAsStream());
assertEquals("Anonymous", c.getAuthor());
assertEquals(10000, c.getId().intValue());
assertEquals("Hi there", c.getMessage());
} finally {
getMethod.releaseConnection();
}
}