}
@Test
public void testClientResponse() throws Exception
{
ResteasyClient resteasyClient = new ResteasyClientBuilder().build();
Client client = ProxyBuilder.builder(Client.class, resteasyClient.target(generateBaseUrl())).build();
Assert.assertEquals("hello", client.getAsString());
Response is = client.getAsInputStream();
Assert.assertEquals("hello", new String(ReadFromStream.readFromStream(
1024, is.readEntity(InputStream.class))));
is.close();
client.postString("new value");
Assert.assertEquals("new value", client.getAsString());
client.postInputStream(new ByteArrayInputStream("new value 2".getBytes()));
Assert.assertEquals("new value 2", client.getAsString());
resteasyClient.close();
}