@Test
        void verifySerializeACachingPrincipalAttributesRepositoryToJson() throws Throwable {
            val jsonFile = Files.createTempFile(RandomUtils.randomAlphabetic(8), ".json").toFile();
            val repositoryWritten = getPrincipalAttributesRepository(TimeUnit.MILLISECONDS.toString(), 1);
            repositoryWritten.setAttributeRepositoryIds(CollectionUtils.wrapSet("1", "2", "3"));
            MAPPER.writeValue(jsonFile, repositoryWritten);
            val repositoryRead = MAPPER.readValue(jsonFile, CachingPrincipalAttributesRepository.class);
            assertEquals(repositoryWritten, repositoryRead);
        }
Handles tests for {@link CachingPrincipalAttributesRepository}.

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