@Test
    void verifyServiceRemovals() {
        getRegisteredServiceTypes().forEach(type -> {
            val list = IntStream.range(1, 5)
                .mapToObj(i -> buildRegisteredServiceInstance(RandomUtils.nextInt(), type)
                    .setId(RegisteredServiceDefinition.INITIAL_IDENTIFIER_VALUE))
                .map(r -> serviceRegistry.save(r))
                .toList();

            list.forEach(Unchecked.consumer(r2 -> {
                Thread.sleep(1000);
                assertTrue(serviceRegistry.delete(r2));
                Thread.sleep(2000);
                assertNull(serviceRegistry.findServiceById(r2.getId()));
            }));
        });
    }
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