@Test
        void ensureCachedAttributesWithUpdate() {
            val context = RegisteredServiceAttributeReleasePolicyContext.builder()
                .applicationContext(applicationContext)
                .principal(PRINCIPAL)
                .registeredService(CoreAuthenticationTestUtils.getRegisteredService(UUID.randomUUID().toString(), UUID.randomUUID().toString()))
                .build();
            val repository = getPrincipalAttributesRepository(TimeUnit.SECONDS.name(), 5);
            assertEquals(1, repository.getAttributes(context).size());
            assertTrue(repository.getAttributes(context).containsKey(MAIL));
            REPOSITORY_ATTRIBUTES.clear();
            assertTrue(repository.getAttributes(context).containsKey(MAIL));

        }
Handles tests for {@link ExpiringPrincipalAttributesRepositoryTests}.

@author Misagh Moayyed
@since 7.0.0
core/cas-server-core/src/test/java/org/apereo/cas/authentication/principal/cache/ExpiringPrincipalAttributesRepositoryTests.java