@Test
    void verifyScopesOperation() throws Throwable {
        val accessToken = buildAccessToken();
        ticketRegistry.addTicket(accessToken);

        mockMvc.perform(post("/heimdall/authorize")
            .contentType(MediaType.APPLICATION_JSON)
            .content(AuthorizationRequest.builder()
                .uri("/api/scopes")
                .method("POST")
                .namespace("API_SCOPES")
                .build()
                .toJson()
            )
            .header(HttpHeaders.AUTHORIZATION, "Bearer %s".formatted(accessToken.getId()))
            .accept(MediaType.APPLICATION_JSON)
        ).andExpect(status().isOk());
    }
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