@Test
    void verifyPermissionRegistrationOperation() throws Throwable {
        val results = authenticateUmaRequestWithProtectionScope();
        val body = createUmaPermissionRegistrationRequest(100).toJson();
        val response = umaPermissionRegistrationEndpointController.handle(body, results.getLeft(), results.getMiddle());
        assertEquals(HttpStatus.BAD_REQUEST, response.getStatusCode());
        assertNotNull(response.getBody());
        val model = (Map) response.getBody();
        assertTrue(model.containsKey("code"));
        assertTrue(model.containsKey("message"));
    }
This is {@link UmaPermissionRegistrationEndpointControllerTests}.

@author Misagh Moayyed
@since 6.0.0
support/cas-server-support-oauth-uma/src/test/java/org/apereo/cas/uma/web/controllers/permission/UmaPermissionRegistrationEndpointControllerTests.java