@Test
    void verifyCachedMetadataObject() throws Throwable {
        val body = MAPPER.readValue(mockMvc.perform(get("/actuator/samlIdPRegisteredServiceMetadataCache")
            .queryParam("serviceId", samlRegisteredService.getServiceId())
            .queryParam("force", "true")
            .contentType(MediaType.APPLICATION_FORM_URLENCODED_VALUE)
            .accept(MediaType.APPLICATION_JSON)
        ).andExpect(status().isOk()).andReturn().getResponse().getContentAsString(), Map.class);
        assertTrue(body.containsKey(samlRegisteredService.getServiceId()));
    }
This is {@link SamlRegisteredServiceCachedMetadataEndpointTests}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-saml-idp/src/test/java/org/apereo/cas/support/saml/web/idp/metadata/SamlRegisteredServiceCachedMetadataEndpointTests.java