EVCacheConfiguration { private static EVCacheClientPoolConfigurationProperties create(final String keyPrefix, final Duration timeToLive, final boolean retryEnabled, final boolean exceptionThrowingEnabled) { Assert.notNull(keyPrefix, "`keyPrefix` must not be null"); Assert.state(keyPrefix.matches(PATTERN_KEY_PREFIX), "`keyPrefix` must not contain colon(:) or whitespace"); Assert.notNull(timeToLive, "`timeToLive` must not be null"); final EVCacheClientPoolConfigurationProperties result = new EVCacheClientPoolConfigurationProperties(); result.setKeyPrefix(keyPrefix); result.setTimeToLive(timeToLive); result.setRetryEnabled(retryEnabled); result.setExceptionThrowingEnabled(exceptionThrowingEnabled); return result; } EVCacheConfiguration(final String cacheName,
                                final int striped,
                                final String appName,
                                final EVCacheClientPoolConfigurationProperties properties);  EVCacheConfiguration(final String cacheName,
                                final int striped,
                                final String appName,
                                final String keyPrefix,
                                final Duration timeToLive,
                                final boolean retryEnabled,
                                final boolean exceptionThrowingEnabled); @Override boolean equals(final Object obj); @Override int hashCode(); String getCacheName(); int getStriped(); String getAppName(); EVCacheClientPoolConfigurationProperties getProperties(); static final String PATTERN_KEY_PREFIX; }
@Test void should_be_equals_when_name_are_equals() { final EVCacheConfiguration config = create("TEST", "TEST", "test1", 1); assertThat(config).isEqualTo(create("TEST", "TEST", "test1", 1)); assertThat(config).isEqualTo(create("TEST", "TEST1", "test1", 1)); assertThat(config).isEqualTo(create("TEST", "TEST", "test", 1)); assertThat(config).isNotEqualTo(create("TEST1", "TEST1", "test1", 1)); assertThat(config).isNotEqualTo(create("TEST1", "TEST", "test", 1)); }