}
};
conf.applications(app);
RestClient client = new RestClient(conf);
Resource resource = client.resource(serviceURL + "/testResourcePut");
Foo response =
resource.contentType("text/plain").accept("text/plain").post(Foo.class,
new Foo(SENT_MESSAGE));
assertEquals(RECEIVED_MESSAGE, response.foo);
// Negative test - Foo Provider not registered
try {
client = new RestClient();
resource = client.resource(serviceURL + "/testResourcePut");
response =
resource.contentType("text/plain").accept("text/plain").post(Foo.class,
new Foo(SENT_MESSAGE));
fail("ClientRuntimeException must be thrown");
} catch (ClientRuntimeException e) {