@Test
    void verifyAuthZenRequestFails() throws Throwable {
        val credentials = EncodingUtils.encodeBase64("casuser:badpassword");
        mockMvc.perform(post("/heimdall/authzen")
                .contentType(MediaType.APPLICATION_JSON)
                .content(AuthorizationRequest.builder()
                    .subject(AuthZenSubject.builder().id("casperson").type("user").build())
                    .resource(AuthZenResource.builder().id("authzen_resource").type("entity").build())
                    .action(AuthZenAction.builder().name("can_read").build())
                    .build()
                    .toJson()
                )
                .header(HttpHeaders.AUTHORIZATION, "Basic %s".formatted(credentials))
                .accept(MediaType.APPLICATION_JSON)
            )
            .andExpect(status().isForbidden())
            .andExpect(jsonPath("$.decision").value(false));
    }
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