public void testIsUserInRole() throws Exception {
User user = this.userAggregate();
DomainRegistry.userRepository().add(user);
Role role = this.roleAggregate();
role.assignUser(user);
DomainRegistry.roleRepository().add(role);
String url = "http://localhost:" + PORT + "/tenants/{tenantId}/users/{username}/inRole/{role}";
System.out.println(">>> GET: " + url);
ClientRequest request = new ClientRequest(url);
request.pathParameter("tenantId", user.tenantId().id());
request.pathParameter("username", user.username());
request.pathParameter("role", role.name());
ClientResponse<String> response = request.get(String.class);
assertEquals(200, response.getStatus());
String entity = response.getEntity();
System.out.println(entity);
RepresentationReader reader = new RepresentationReader(entity);
assertEquals(user.username(), reader.stringValue("username"));
assertEquals(role.name(), reader.stringValue("role"));
}