@Test
    void verifyInvalidRedirect() throws Throwable {
        val id = UUID.randomUUID().toString();
        val service = getRegisteredService(id, "secret");
        servicesManager.save(service);

        val results = authenticateUmaRequestWithProtectionScope();

        val ticketId = UUID.randomUUID().toString();
        val permissionTicket = getUmaPermissionTicket(ticketId);
        ticketRegistry.addTicket(permissionTicket);

        assertThrows(UnauthorizedServiceException.class,
            () -> umaRequestingPartyClaimsCollectionEndpointController.getClaims(id,
                "bad-redirect", ticketId,
                "state", results.getLeft(), results.getMiddle()));
    }
This is {@link UmaRequestingPartyClaimsCollectionEndpointControllerTests}.

@author Misagh Moayyed
@since 6.3.0
support/cas-server-support-oauth-uma/src/test/java/org/apereo/cas/uma/web/controllers/claims/UmaRequestingPartyClaimsCollectionEndpointControllerTests.java