public static NearCacheConfig copyWithInitializedDefaultMaxSizeForOnHeapMaps(NearCacheConfig nearCacheConfig) {
        if (nearCacheConfig == null) {
            return null;
        }

        EvictionConfig evictionConfig = nearCacheConfig.getEvictionConfig();
        if (nearCacheConfig.getInMemoryFormat() == InMemoryFormat.NATIVE
                || evictionConfig.sizeConfigured) {
            return nearCacheConfig;
        }

        // create copy of eviction config
        EvictionConfig copyEvictionConfig = new EvictionConfig(evictionConfig)
                .setSize(MapConfig.DEFAULT_MAX_SIZE);

        // create copy of nearCache config and set eviction config
        return new NearCacheConfig(nearCacheConfig)
                .setEvictionConfig(copyEvictionConfig);
    }
@Test
    public void testCopyInitDefaultMaxSizeForOnHeapMaps_whenNull_thenDoNothing() {
        NearCacheConfigAccessor.copyWithInitializedDefaultMaxSizeForOnHeapMaps(null);
    }