@Test
public void testRoleId()
{
String newRole = "{ \"role\" : { \"id\" : \"5\", \"name\" : \"admin\"} }";
ResteasyClient client = new ResteasyClientBuilder().providerFactory(deployment.getProviderFactory()).build();
Response response = client.target(generateURL("/roles")).request().post(Entity.json(newRole));
Assert.assertEquals(response.getStatus(), 201);
response.close();
ResteasyWebTarget target = client.target(response.getLocation());
String role = target.request().get(String.class);
System.out.println(role);
Role u = target.request().get(Role.class);
System.out.println(u);
Assert.assertEquals("admin", u.getName());
Assert.assertEquals("5", u.getId());
u.setName("administrator");
Assert.assertEquals(target.request().put(Entity.json(u)).getStatus(), 204);
u = target.request().get(Role.class);
System.out.println(u);
Assert.assertEquals("administrator", u.getName());
Assert.assertEquals("5", u.getId());
Assert.assertEquals(target.request().delete().getStatus(), 204);
response = target.request().get();
Assert.assertEquals(404, response.getStatus());
client.close();
}