@Test
    void verifyDelete() {
        val registeredService = new CasRegisteredService();
        registeredService.setId(RandomUtils.nextLong());
        registeredService.setName(UUID.randomUUID().toString());
        registeredService.setServiceId(registeredService.getName());
        servicesManager.save(registeredService);
        assertTrue(isServiceInCache(null, registeredService.getId()));
        assertNotNull(servicesManager.findServiceBy(RegisteredServiceTestUtils.getService(registeredService.getServiceId())));
        servicesManager.delete(registeredService);
        assertNull(servicesManager.findServiceBy(registeredService.getId()));
        assertFalse(isServiceInCache(null, registeredService.getId()));
    }
This is {@link AbstractServicesManagerTests}.

@author Misagh Moayyed
@since 5.2.0
core/cas-server-core-services/src/test/java/org/apereo/cas/services/AbstractServicesManagerTests.java