CacheConfig<K, V> asCacheConfig() {
        return this.copy(new CacheConfig<>(), false);
    }
@Test
    public void serializationSucceeds_cacheWriterFactory() {
        CacheConfig<String, Person> cacheConfig = newDefaultCacheConfig("test");
        cacheConfig.setCacheWriterFactory(new PersonCacheWriterFactory());
        PreJoinCacheConfig preJoinCacheConfig = new PreJoinCacheConfig(cacheConfig);
        Data data  = serializationService.toData(preJoinCacheConfig);
        PreJoinCacheConfig deserialized = serializationService.toObject(data);
        assertEquals(preJoinCacheConfig, deserialized);
        assertEquals(cacheConfig, deserialized.asCacheConfig());
        assertNull(deserialized.getCacheLoaderFactory());
        assertTrue("Invalid Factory Class", deserialized.getCacheWriterFactory() instanceof PersonCacheWriterFactory);
    }