assertEquals("OK", clientResponse.getStatusType().getReasonPhrase());
}
public void testResourcePost() throws IOException {
server.setMockResponseCode(200);
RestClient client = getRestClient();
Resource resource = client.resource(serviceURL + "/testResourcePost");
String response =
resource.contentType("text/plain").accept("text/plain")
.post(String.class, SENT_MESSAGE);
assertEquals(RECEIVED_MESSAGE, response);
assertEquals(SENT_MESSAGE, server.getRequestContentAsString());