use of classloading.domain.PersonCacheEntryListenerConfiguration in project hazelcast by hazelcast.
the class PreJoinCacheConfigTest method serializationSucceeds_cacheListeners.
@Test
public void serializationSucceeds_cacheListeners() {
CacheConfig<String, Person> cacheConfig = newDefaultCacheConfig("test");
cacheConfig.getListenerConfigurations().add(new PersonCacheEntryListenerConfiguration());
PreJoinCacheConfig preJoinCacheConfig = new PreJoinCacheConfig(cacheConfig);
Data data = serializationService.toData(preJoinCacheConfig);
PreJoinCacheConfig deserialized = serializationService.toObject(data);
assertEquals(preJoinCacheConfig, deserialized);
assertEquals(cacheConfig, deserialized.asCacheConfig());
assertNull(deserialized.getCacheWriterFactory());
assertEquals(1, deserialized.getListenerConfigurations().size());
assertTrue("Invalid Factory Class", deserialized.getCacheEntryListenerConfigurations().iterator().next() instanceof PersonCacheEntryListenerConfiguration);
}
Aggregations