@Test
    void verifyOperation() throws Throwable {
        mockMvc.perform(delete("/actuator/registeredServices/cache")
            .contentType(MediaType.APPLICATION_JSON)
        ).andExpect(status().isOk());

        val service1 = RegisteredServiceTestUtils.getRegisteredService(UUID.randomUUID().toString());
        val service2 = RegisteredServiceTestUtils.getRegisteredService(UUID.randomUUID().toString());
        servicesManager.save(service1, service2);

        mockMvc.perform(get("/actuator/registeredServices")
                .contentType(MediaType.APPLICATION_JSON))
            .andExpect(status().isOk())
            .andExpect(jsonPath("$.length()", greaterThan(0)));

        mockMvc.perform(get("/actuator/registeredServices/type/{type}", CasRegisteredService.class.getSimpleName())
                .contentType(MediaType.APPLICATION_JSON))
            .andExpect(status().isOk())
            .andExpect(jsonPath("$.length()", greaterThan(0)));

        mockMvc.perform(get("/actuator/registeredServices/{id}", service1.getServiceId())
                .contentType(MediaType.APPLICATION_JSON))
            .andExpect(status().isOk())
            .andExpect(jsonPath("$.length()", greaterThan(0)));

        mockMvc.perform(delete("/actuator/registeredServices/{id}", service1.getServiceId())
                .contentType(MediaType.APPLICATION_JSON)    
                .accept(MediaType.APPLICATION_JSON))
            .andExpect(status().isOk())
            .andExpect(content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON));

        mockMvc.perform(get("/actuator/registeredServices/{id}", service1.getId())
                .contentType(MediaType.APPLICATION_JSON))
            .andExpect(status().isNotFound());

        mockMvc.perform(delete("/actuator/registeredServices/{id}", service2.getServiceId())
                .contentType(MediaType.APPLICATION_JSON)
                .accept(MediaType.APPLICATION_JSON))
            .andExpect(status().isOk())
            .andExpect(content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON));

        mockMvc.perform(get("/actuator/registeredServices/{id}", service2.getId())
                .contentType(MediaType.APPLICATION_JSON))
            .andExpect(status().isNotFound());
    }
This is {@link RegisteredServicesEndpointTests}.

@author Misagh Moayyed
@since 6.1.0
support/cas-server-support-reports/src/test/java/org/apereo/cas/web/report/RegisteredServicesEndpointTests.java