@Test
    void verifyDeletingSingleService() {
        getRegisteredServiceTypes().forEach(type -> {
            val rs = buildRegisteredServiceInstance(300, type)
                .setId(RegisteredServiceDefinition.INITIAL_IDENTIFIER_VALUE);
            val rs2 = buildRegisteredServiceInstance(301, type)
                .setId(RegisteredServiceDefinition.INITIAL_IDENTIFIER_VALUE);
            serviceRegistry.save(rs2);
            serviceRegistry.save(rs);
            serviceRegistry.load();
            serviceRegistry.delete(rs2);

            assertFalse(serviceRegistry.load().isEmpty());

            val rsNew = serviceRegistry.findServiceByExactServiceName(rs.getName());
            assertNotNull(rsNew);
        });
    }
Abstracted service registry tests for all implementations.

@author Timur Duehr
@since 5.3.0
core/cas-server-core-services/src/test/java/org/apereo/cas/services/AbstractServiceRegistryTests.java