@Test
    void verifySerialization() throws Throwable {
        val o = DistributedCacheObject.<RegisteredService>builder()
            .value(RegisteredServiceTestUtils.getRegisteredService())
            .publisherIdentifier(new PublisherIdentifier())
            .build();
        val appCtx = new StaticApplicationContext();
        appCtx.refresh();
        val file = new File(FileUtils.getTempDirectoryPath(), UUID.randomUUID() + ".json");
        val mapper = new RegisteredServiceJsonSerializer(appCtx).getObjectMapper();
        mapper.writeValue(file, o);
        val readPolicy = mapper.readValue(file, DistributedCacheObject.class);
        assertEquals(o, readPolicy);
    }
This is {@link CasServicesStreamingKafkaConfigurationTests}.

@author Misagh Moayyed
@since 6.3.0
support/cas-server-support-service-registry-stream-kafka/src/test/java/org/apereo/cas/config/CasServicesStreamingKafkaConfigurationTests.java