@Path("/roles") @GET public void listAllRoles(HttpRequest httpRequest, HttpResponder httpResponder) throws Exception { ensureSecurityEnabled(); httpResponder.sendJson(HttpResponseStatus.OK, GSON.toJson(authorizer.listAllRoles())); createLogEntry(httpRequest, HttpResponseStatus.OK); }
@Path("/roles") @GET public void listAllRoles(HttpRequest httpRequest, HttpResponder httpResponder) throws Exception { ensureSecurityEnabled(); httpResponder.sendJson(HttpResponseStatus.OK, GSON.toJson(authorizer.listAllRoles())); createLogEntry(httpRequest, HttpResponseStatus.OK); }
Set<Role> roles = authorizer.listAllRoles(); Set<Role> expectedRoles = new HashSet<>(); expectedRoles.add(admins); roles = authorizer.listAllRoles(); Assert.assertEquals(Collections.singleton(engineers), roles);