@Test
    void verifyExpiredServiceDisabled() {
        getRegisteredServiceTypes().forEach(type -> {
            val r = buildRegisteredServiceInstance(RandomUtils.nextInt(), type)
                .setId(RegisteredServiceDefinition.INITIAL_IDENTIFIER_VALUE);
            val expirationDate = LocalDateTime.now(ZoneId.systemDefault()).plusSeconds(1);
            r.setExpirationPolicy(new DefaultRegisteredServiceExpirationPolicy(false, expirationDate));
            val r2 = serviceRegistry.save(r);
            val svc = serviceRegistry.findServiceByExactServiceName(r2.getName());
            assertNotNull(svc, () -> "1: " + type.getName());
            val svc2 = serviceRegistry.findServiceByExactServiceName(r2.getName());
            assertNotNull(svc2, () -> "2: " + type.getName());
        });
    }
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