### Question:
AuthorizationHandler extends AbstractAppFabricHttpHandler { @Path("/privileges/revoke") @POST @AuditPolicy(AuditDetail.REQUEST_BODY) public void revoke(FullHttpRequest httpRequest, HttpResponder httpResponder) throws Exception { ensureSecurityEnabled(); RevokeRequest request = parseBody(httpRequest, RevokeRequest.class); if (request == null) { throw new BadRequestException("Missing request body"); } if (request.getPrincipal() == null && request.getActions() == null) { privilegesManager.revoke(request.getAuthorizable()); } else { Set<Action> actions = request.getActions() == null ? EnumSet.allOf(Action.class) : request.getActions(); privilegesManager.revoke(request.getAuthorizable(), request.getPrincipal(), actions); } httpResponder.sendStatus(HttpResponseStatus.OK); createLogEntry(httpRequest, HttpResponseStatus.OK); } @Inject  AuthorizationHandler(PrivilegesManager privilegesManager, AuthorizerInstantiator authorizerInstantiator,
                       CConfiguration cConf, AuthenticationContext authenticationContext); @Path("/privileges/grant") @POST @AuditPolicy(AuditDetail.REQUEST_BODY) void grant(FullHttpRequest httpRequest, HttpResponder httpResponder); @Path("/privileges/revoke") @POST @AuditPolicy(AuditDetail.REQUEST_BODY) void revoke(FullHttpRequest httpRequest, HttpResponder httpResponder); @Path("{principal-type}/{principal-name}/privileges") @GET void listPrivileges(HttpRequest httpRequest, HttpResponder httpResponder,
                             @PathParam("principal-type") String principalType,
                             @PathParam("principal-name") String principalName); @Path("/roles/{role-name}") @PUT void createRole(HttpRequest httpRequest, HttpResponder httpResponder,
                         @PathParam("role-name") String roleName); @Path("/roles/{role-name}") @DELETE void dropRole(HttpRequest httpRequest, HttpResponder httpResponder,
                       @PathParam("role-name") String roleName); @Path("/roles") @GET void listAllRoles(HttpRequest httpRequest, HttpResponder httpResponder); @Path("{principal-type}/{principal-name}/roles") @GET void listRoles(HttpRequest httpRequest, HttpResponder httpResponder,
                        @PathParam("principal-type") String principalType,
                        @PathParam("principal-name") String principalName); @Path("/{principal-type}/{principal-name}/roles/{role-name}") @PUT void addRoleToPrincipal(HttpRequest httpRequest, HttpResponder httpResponder,
                                 @PathParam("principal-type") String principalType,
                                 @PathParam("principal-name") String principalName,
                                 @PathParam("role-name") String roleName); @Path("/{principal-type}/{principal-name}/roles/{role-name}") @DELETE void removeRoleFromPrincipal(HttpRequest httpRequest, HttpResponder httpResponder,
                                      @PathParam("principal-type") String principalType,
                                      @PathParam("principal-name") String principalName,
                                      @PathParam("role-name") String roleName);  }### Answer:
@Test public void testRevokeOnNonExistingEntity() throws FeatureDisabledException, UnauthenticatedException, UnauthorizedException, IOException, NotFoundException { client.revoke(Authorizable.fromEntityId(Ids.namespace("ns3")), admin, ImmutableSet.of(Action.ADMIN)); }
@Test public void testRevokeAllOnNonExistingEntity() throws Exception { client.revoke(Authorizable.fromEntityId(Ids.namespace("ns3"))); }