null));
// postMethod.addRequestHeader("Accept", "text/xml");
client.executeMethod(postMethod);
assertEquals(Status.BAD_REQUEST.getStatusCode(), postMethod.getStatusCode());
CommentError c =
(CommentError)JAXBContext.newInstance(CommentError.class.getPackage().getName())
.createUnmarshaller().unmarshal(postMethod.getResponseBodyAsStream());
assertEquals("Please include a comment ID, a message, and your name.", c
.getErrorMessage());
} finally {
postMethod.releaseConnection();
}
}