WebTarget target = client.target("http://localhost:9095/customers/{id}");
Response response = target.resolveTemplate("id", "12345").request().get();
try
{
Assert.assertEquals(200, response.getStatus());
Customer cust = response.readEntity(Customer.class);
Assert.assertEquals("Bill", cust.getName());
}
finally
{
response.close();
client.close();