CacheConfig<K, V> asCacheConfig() {
        return this.copy(new CacheConfig<>(), false);
    }
@Test
    public void serializationSucceeds_whenKVTypes_setAsClassObjects() {
        CacheConfig cacheConfig = newDefaultCacheConfig("test");
        cacheConfig.setKeyType(Integer.class);
        cacheConfig.setValueType(String.class);
        PreJoinCacheConfig preJoinCacheConfig = new PreJoinCacheConfig(cacheConfig);
        Data data = serializationService.toData(preJoinCacheConfig);
        PreJoinCacheConfig deserialized = serializationService.toObject(data);
        assertEquals(preJoinCacheConfig, deserialized);
        assertEquals(cacheConfig, deserialized.asCacheConfig());
    }