@Test
    void verifyGrouperGroupPolicy() throws Throwable {
        val principal = RegisteredServiceTestUtils.getPrincipal(UUID.randomUUID().toString(),
            Map.of("color", List.of("red", "green"), "memberOf", List.of("admin")));
        val authentication = RegisteredServiceTestUtils.getAuthentication(principal);
        val accessToken = buildAccessToken(authentication);
        ticketRegistry.addTicket(accessToken);

        mockMvc.perform(post("/heimdall/authorize")
            .contentType(MediaType.APPLICATION_JSON)
            .content(AuthorizationRequest.builder()
                .uri("/api/grouper")
                .method("POST")
                .namespace("API_GROUPER")
                .build()
                .toJson()
            )
            .header(HttpHeaders.AUTHORIZATION, "Bearer %s".formatted(accessToken.getId()))
            .accept(MediaType.APPLICATION_JSON)
        ).andExpect(status().isForbidden());
    }
This is {@link HeimdallAuthorizationControllerTests}.

@author Misagh Moayyed
@since 7.2.0
support/cas-server-support-heimdall/src/test/java/org/apereo/cas/heimdall/HeimdallAuthorizationControllerTests.java