### Question:
TokenOwnerAuthzModule implements CrestAuthorizationModule { @Override public Promise<AuthorizationResult, ResourceException> authorizePatch(Context context, PatchRequest patchRequest) { return new ForbiddenException().asPromise(); } TokenOwnerAuthzModule(String tokenId, SSOTokenManager ssoTokenManager, String... allowedActions); @Override String getName(); @Override Promise<AuthorizationResult, ResourceException> authorizeCreate(Context context, CreateRequest createRequest); @Override Promise<AuthorizationResult, ResourceException> authorizeRead(Context context, ReadRequest readRequest); @Override Promise<AuthorizationResult, ResourceException> authorizeUpdate(Context context, UpdateRequest updateRequest); @Override Promise<AuthorizationResult, ResourceException> authorizeDelete(Context context, DeleteRequest deleteRequest); @Override Promise<AuthorizationResult, ResourceException> authorizePatch(Context context, PatchRequest patchRequest); @Override Promise<AuthorizationResult, ResourceException> authorizeAction(Context context, ActionRequest request); @Override Promise<AuthorizationResult, ResourceException> authorizeQuery(Context context, QueryRequest queryRequest); final static String NAME; }### Answer:
@Test public void testPatchIsForbidden() { Promise<AuthorizationResult, ResourceException> promise = testModule.authorizePatch(mockContext, mock(PatchRequest.class)); assertThat(promise).failedWithException().isExactlyInstanceOf(ForbiddenException.class); }