@Override
    public CacheSimpleConfig setName(String name) {
        this.name = name;
        return this;
    }
@Test
    public void testEqualsAndHashCode() {
        assumeDifferentHashCodes();

        CacheSimpleEntryListenerConfig redEntryListenerConfig = new CacheSimpleEntryListenerConfig();
        redEntryListenerConfig.setCacheEntryListenerFactory("red");

        CacheSimpleEntryListenerConfig blackEntryListenerConfig = new CacheSimpleEntryListenerConfig();
        blackEntryListenerConfig.setCacheEntryListenerFactory("black");

        EqualsVerifier.forClass(CacheSimpleConfig.class)
                .suppress(Warning.NONFINAL_FIELDS, Warning.NULL_FIELDS)
                .withPrefabValues(EvictionConfig.class,
                        new EvictionConfig().setSize(1000)
                                .setMaxSizePolicy(MaxSizePolicy.ENTRY_COUNT)
                                .setEvictionPolicy(EvictionPolicy.LFU),
                        new EvictionConfig().setSize(300)
                                .setMaxSizePolicy(MaxSizePolicy.USED_NATIVE_MEMORY_PERCENTAGE)
                                .setEvictionPolicy(EvictionPolicy.LRU))
                .withPrefabValues(WanReplicationRef.class,
                        new WanReplicationRef("red", null, null, false),
                        new WanReplicationRef("black", null, null, true))
                .withPrefabValues(CacheSimpleConfig.class,
                        new CacheSimpleConfig().setName("red"),
                        new CacheSimpleConfig().setName("black"))
                .withPrefabValues(CacheSimpleEntryListenerConfig.class,
                        redEntryListenerConfig,
                        blackEntryListenerConfig)
                .withPrefabValues(CachePartitionLostListenerConfig.class,
                        new CachePartitionLostListenerConfig("red"),
                        new CachePartitionLostListenerConfig("black"))
                .withPrefabValues(MergePolicyConfig.class,
                        new MergePolicyConfig("policy1", 1),
                        new MergePolicyConfig("policy2", 2))
                .verify();
    }