public void testResourceDelete() {
server.setMockResponseCode(200);
RestClient client = getRestClient();
Resource resource = client.resource(serviceURL);
String response = resource.accept(MediaType.TEXT_PLAIN_TYPE).delete(String.class);
assertEquals(RECEIVED_MESSAGE, response);
// do delete with response
ClientResponse clientResponse = resource.delete();
assertEquals(RECEIVED_MESSAGE, clientResponse.getEntity(String.class));