diff --git a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceConnectionFactoryUnitTests.java b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceConnectionFactoryUnitTests.java index e93263668e..2a9e752a54 100644 --- a/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceConnectionFactoryUnitTests.java +++ b/src/test/java/org/springframework/data/redis/connection/lettuce/LettuceConnectionFactoryUnitTests.java @@ -15,13 +15,8 @@ */ package org.springframework.data.redis.connection.lettuce; -import static org.hamcrest.core.Is.*; -import static org.hamcrest.core.IsEqual.*; -import static org.hamcrest.core.IsInstanceOf.*; -import static org.hamcrest.core.IsNull.*; -import static org.junit.Assert.*; +import static org.assertj.core.api.Assertions.*; import static org.mockito.Mockito.*; -import static org.mockito.Mockito.any; import static org.springframework.data.redis.connection.ClusterTestVariables.*; import static org.springframework.data.redis.connection.RedisConfiguration.*; import static org.springframework.data.redis.connection.lettuce.LettuceTestClientResources.*; @@ -50,7 +45,6 @@ import org.junit.Before; import org.junit.Test; import org.mockito.ArgumentMatchers; - import org.springframework.beans.DirectFieldAccessor; import org.springframework.data.redis.ConnectionFactoryTracker; import org.springframework.data.redis.connection.RedisClusterConfiguration; @@ -93,7 +87,7 @@ public void shouldInitClientCorrectlyWhenClusterConfigPresent() { connectionFactory.afterPropertiesSet(); ConnectionFactoryTracker.add(connectionFactory); - assertThat(getField(connectionFactory, "client"), instanceOf(RedisClusterClient.class)); + assertThat(getField(connectionFactory, "client")).isInstanceOf(RedisClusterClient.class); } @Test // DATAREDIS-315 @@ -107,12 +101,12 @@ public void timeoutShouldBeSetCorrectlyOnClusterClient() { ConnectionFactoryTracker.add(connectionFactory); AbstractRedisClient client = (AbstractRedisClient) getField(connectionFactory, "client"); - assertThat(client, instanceOf(RedisClusterClient.class)); + assertThat(client).isInstanceOf(RedisClusterClient.class); Iterable initialUris = (Iterable) getField(client, "initialUris"); for (RedisURI uri : initialUris) { - assertThat(uri.getTimeout(), is(equalTo(Duration.ofMillis(connectionFactory.getTimeout())))); + assertThat(uri.getTimeout()).isEqualTo(Duration.ofMillis(connectionFactory.getTimeout())); } } @@ -124,7 +118,7 @@ public void portShouldBeReturnedProperlyBasedOnConfiguration() { LettuceConnectionFactory connectionFactory = new LettuceConnectionFactory(redisConfiguration, LettuceClientConfiguration.defaultConfiguration()); - assertThat(connectionFactory.getPort(), is(16379)); + assertThat(connectionFactory.getPort()).isEqualTo(16379); } @Test // DATAREDIS-930 @@ -135,8 +129,8 @@ public void portShouldBeReturnedProperlyBasedOnCustomRedisConfiguration() { LettuceConnectionFactory connectionFactory = new LettuceConnectionFactory(redisConfiguration, LettuceClientConfiguration.defaultConfiguration()); - assertThat(connectionFactory.getPort(), is(16379)); - assertThat(connectionFactory.getHostName(), is("localhost")); + assertThat(connectionFactory.getPort()).isEqualTo(16379); + assertThat(connectionFactory.getHostName()).isEqualTo("localhost"); } @Test // DATAREDIS-930 @@ -147,7 +141,7 @@ public void hostNameShouldBeReturnedProperlyBasedOnConfiguration() { LettuceConnectionFactory connectionFactory = new LettuceConnectionFactory(redisConfiguration, LettuceClientConfiguration.defaultConfiguration()); - assertThat(connectionFactory.getHostName(), is("external")); + assertThat(connectionFactory.getHostName()).isEqualTo("external"); } @Test // DATAREDIS-930 @@ -158,8 +152,8 @@ public void hostNameShouldBeReturnedProperlyBasedOnCustomRedisConfiguration() { LettuceConnectionFactory connectionFactory = new LettuceConnectionFactory(redisConfiguration, LettuceClientConfiguration.defaultConfiguration()); - assertThat(connectionFactory.getPort(), is(6379)); - assertThat(connectionFactory.getHostName(), is("external")); + assertThat(connectionFactory.getPort()).isEqualTo(6379); + assertThat(connectionFactory.getHostName()).isEqualTo("external"); } @Test // DATAREDIS-315 @@ -173,12 +167,12 @@ public void passwordShouldBeSetCorrectlyOnClusterClient() { ConnectionFactoryTracker.add(connectionFactory); AbstractRedisClient client = (AbstractRedisClient) getField(connectionFactory, "client"); - assertThat(client, instanceOf(RedisClusterClient.class)); + assertThat(client).isInstanceOf(RedisClusterClient.class); Iterable initialUris = (Iterable) getField(client, "initialUris"); for (RedisURI uri : initialUris) { - assertThat(uri.getPassword(), is(equalTo(connectionFactory.getPassword().toCharArray()))); + assertThat(uri.getPassword()).isEqualTo(connectionFactory.getPassword().toCharArray()); } } @@ -193,11 +187,11 @@ public void passwordShouldBeSetCorrectlyOnSentinelClient() { ConnectionFactoryTracker.add(connectionFactory); AbstractRedisClient client = (AbstractRedisClient) getField(connectionFactory, "client"); - assertThat(client, instanceOf(RedisClient.class)); + assertThat(client).isInstanceOf(RedisClient.class); RedisURI redisUri = (RedisURI) getField(client, "redisURI"); - assertThat(redisUri.getPassword(), is(equalTo(connectionFactory.getPassword().toCharArray()))); + assertThat(redisUri.getPassword()).isEqualTo(connectionFactory.getPassword().toCharArray()); } @Test // DATAREDIS-462 @@ -209,7 +203,7 @@ public void clusterClientShouldInitializeWithoutClientResources() { ConnectionFactoryTracker.add(connectionFactory); AbstractRedisClient client = (AbstractRedisClient) getField(connectionFactory, "client"); - assertThat(client, instanceOf(RedisClusterClient.class)); + assertThat(client).isInstanceOf(RedisClusterClient.class); } @Test // DATAREDIS-480 @@ -221,16 +215,16 @@ public void sslOptionsShouldBeDisabledByDefaultOnClient() { ConnectionFactoryTracker.add(connectionFactory); AbstractRedisClient client = (AbstractRedisClient) getField(connectionFactory, "client"); - assertThat(client, instanceOf(RedisClient.class)); + assertThat(client).isInstanceOf(RedisClient.class); RedisURI redisUri = (RedisURI) getField(client, "redisURI"); - assertThat(redisUri.isSsl(), is(false)); - assertThat(connectionFactory.isUseSsl(), is(false)); - assertThat(redisUri.isStartTls(), is(false)); - assertThat(connectionFactory.isStartTls(), is(false)); - assertThat(redisUri.isVerifyPeer(), is(true)); - assertThat(connectionFactory.isVerifyPeer(), is(true)); + assertThat(redisUri.isSsl()).isFalse(); + assertThat(connectionFactory.isUseSsl()).isFalse(); + assertThat(redisUri.isStartTls()).isFalse(); + assertThat(connectionFactory.isStartTls()).isFalse(); + assertThat(redisUri.isVerifyPeer()).isTrue(); + assertThat(connectionFactory.isVerifyPeer()).isTrue(); } @Test // DATAREDIS-476 @@ -243,14 +237,14 @@ public void sslShouldBeSetCorrectlyOnClient() { ConnectionFactoryTracker.add(connectionFactory); AbstractRedisClient client = (AbstractRedisClient) getField(connectionFactory, "client"); - assertThat(client, instanceOf(RedisClient.class)); + assertThat(client).isInstanceOf(RedisClient.class); RedisURI redisUri = (RedisURI) getField(client, "redisURI"); - assertThat(redisUri.isSsl(), is(true)); - assertThat(connectionFactory.isUseSsl(), is(true)); - assertThat(redisUri.isVerifyPeer(), is(true)); - assertThat(connectionFactory.isVerifyPeer(), is(true)); + assertThat(redisUri.isSsl()).isTrue(); + assertThat(connectionFactory.isUseSsl()).isTrue(); + assertThat(redisUri.isVerifyPeer()).isTrue(); + assertThat(connectionFactory.isVerifyPeer()).isTrue(); } @Test // DATAREDIS-480 @@ -263,12 +257,12 @@ public void verifyPeerOptionShouldBeSetCorrectlyOnClient() { ConnectionFactoryTracker.add(connectionFactory); AbstractRedisClient client = (AbstractRedisClient) getField(connectionFactory, "client"); - assertThat(client, instanceOf(RedisClient.class)); + assertThat(client).isInstanceOf(RedisClient.class); RedisURI redisUri = (RedisURI) getField(client, "redisURI"); - assertThat(redisUri.isVerifyPeer(), is(false)); - assertThat(connectionFactory.isVerifyPeer(), is(false)); + assertThat(redisUri.isVerifyPeer()).isFalse(); + assertThat(connectionFactory.isVerifyPeer()).isFalse(); } @Test // DATAREDIS-480 @@ -281,12 +275,12 @@ public void startTLSOptionShouldBeSetCorrectlyOnClient() { ConnectionFactoryTracker.add(connectionFactory); AbstractRedisClient client = (AbstractRedisClient) getField(connectionFactory, "client"); - assertThat(client, instanceOf(RedisClient.class)); + assertThat(client).isInstanceOf(RedisClient.class); RedisURI redisUri = (RedisURI) getField(client, "redisURI"); - assertThat(redisUri.isStartTls(), is(true)); - assertThat(connectionFactory.isStartTls(), is(true)); + assertThat(redisUri.isStartTls()).isTrue(); + assertThat(connectionFactory.isStartTls()).isTrue(); } @Test // DATAREDIS-537 @@ -300,12 +294,12 @@ public void sslShouldBeSetCorrectlyOnClusterClient() { ConnectionFactoryTracker.add(connectionFactory); AbstractRedisClient client = (AbstractRedisClient) getField(connectionFactory, "client"); - assertThat(client, instanceOf(RedisClusterClient.class)); + assertThat(client).isInstanceOf(RedisClusterClient.class); Iterable initialUris = (Iterable) getField(client, "initialUris"); for (RedisURI uri : initialUris) { - assertThat(uri.isSsl(), is(true)); + assertThat(uri.isSsl()).isTrue(); } } @@ -320,12 +314,12 @@ public void startTLSOptionShouldBeSetCorrectlyOnClusterClient() { ConnectionFactoryTracker.add(connectionFactory); AbstractRedisClient client = (AbstractRedisClient) getField(connectionFactory, "client"); - assertThat(client, instanceOf(RedisClusterClient.class)); + assertThat(client).isInstanceOf(RedisClusterClient.class); Iterable initialUris = (Iterable) getField(client, "initialUris"); for (RedisURI uri : initialUris) { - assertThat(uri.isStartTls(), is(true)); + assertThat(uri.isStartTls()).isTrue(); } } @@ -340,12 +334,12 @@ public void verifyPeerTLSOptionShouldBeSetCorrectlyOnClusterClient() { ConnectionFactoryTracker.add(connectionFactory); AbstractRedisClient client = (AbstractRedisClient) getField(connectionFactory, "client"); - assertThat(client, instanceOf(RedisClusterClient.class)); + assertThat(client).isInstanceOf(RedisClusterClient.class); Iterable initialUris = (Iterable) getField(client, "initialUris"); for (RedisURI uri : initialUris) { - assertThat(uri.isVerifyPeer(), is(true)); + assertThat(uri.isVerifyPeer()).isTrue(); } } @@ -357,11 +351,11 @@ public void socketShouldBeSetOnStandaloneClient() { ConnectionFactoryTracker.add(connectionFactory); AbstractRedisClient client = (AbstractRedisClient) getField(connectionFactory, "client"); - assertThat(client, instanceOf(RedisClient.class)); + assertThat(client).isInstanceOf(RedisClient.class); RedisURI redisUri = (RedisURI) getField(client, "redisURI"); - assertThat(redisUri.getSocket(), is("/tmp/redis.sock")); + assertThat(redisUri.getSocket()).isEqualTo("/tmp/redis.sock"); } @Test // DATAREDIS-574 @@ -373,7 +367,7 @@ public void shouldReadStandalonePassword() { LettuceConnectionFactory connectionFactory = new LettuceConnectionFactory(envConfig, LettuceClientConfiguration.defaultConfiguration()); - assertThat(connectionFactory.getPassword(), is(equalTo("foo"))); + assertThat(connectionFactory.getPassword()).isEqualTo("foo"); } @Test // DATAREDIS-574 @@ -386,8 +380,8 @@ public void shouldWriteStandalonePassword() { LettuceClientConfiguration.defaultConfiguration()); connectionFactory.setPassword("bar"); - assertThat(connectionFactory.getPassword(), is(equalTo("bar"))); - assertThat(envConfig.getPassword(), is(equalTo(RedisPassword.of("bar")))); + assertThat(connectionFactory.getPassword()).isEqualTo("bar"); + assertThat(envConfig.getPassword()).isEqualTo(RedisPassword.of("bar")); } @Test // DATAREDIS-574 @@ -399,7 +393,7 @@ public void shouldReadSentinelPassword() { LettuceConnectionFactory connectionFactory = new LettuceConnectionFactory(envConfig, LettuceClientConfiguration.defaultConfiguration()); - assertThat(connectionFactory.getPassword(), is(equalTo("foo"))); + assertThat(connectionFactory.getPassword()).isEqualTo("foo"); } @Test // DATAREDIS-574 @@ -412,8 +406,8 @@ public void shouldWriteSentinelPassword() { LettuceClientConfiguration.defaultConfiguration()); connectionFactory.setPassword("bar"); - assertThat(connectionFactory.getPassword(), is(equalTo("bar"))); - assertThat(envConfig.getPassword(), is(equalTo(RedisPassword.of("bar")))); + assertThat(connectionFactory.getPassword()).isEqualTo("bar"); + assertThat(envConfig.getPassword()).isEqualTo(RedisPassword.of("bar")); } @Test // DATAREDIS-682 @@ -426,8 +420,8 @@ public void shouldWriteSocketPassword() { LettuceClientConfiguration.defaultConfiguration()); connectionFactory.setPassword("bar"); - assertThat(connectionFactory.getPassword(), is(equalTo("bar"))); - assertThat(envConfig.getPassword(), is(equalTo(RedisPassword.of("bar")))); + assertThat(connectionFactory.getPassword()).isEqualTo("bar"); + assertThat(envConfig.getPassword()).isEqualTo(RedisPassword.of("bar")); } @Test // DATAREDIS-574 @@ -439,7 +433,7 @@ public void shouldReadClusterPassword() { LettuceConnectionFactory connectionFactory = new LettuceConnectionFactory(envConfig, LettuceClientConfiguration.defaultConfiguration()); - assertThat(connectionFactory.getPassword(), is(equalTo("foo"))); + assertThat(connectionFactory.getPassword()).isEqualTo("foo"); } @Test // DATAREDIS-574 @@ -452,8 +446,8 @@ public void shouldWriteClusterPassword() { LettuceClientConfiguration.defaultConfiguration()); connectionFactory.setPassword("bar"); - assertThat(connectionFactory.getPassword(), is(equalTo("bar"))); - assertThat(envConfig.getPassword(), is(equalTo(RedisPassword.of("bar")))); + assertThat(connectionFactory.getPassword()).isEqualTo("bar"); + assertThat(envConfig.getPassword()).isEqualTo(RedisPassword.of("bar")); } @Test // DATAREDIS-574 @@ -465,7 +459,7 @@ public void shouldReadStandaloneDatabaseIndex() { LettuceConnectionFactory connectionFactory = new LettuceConnectionFactory(envConfig, LettuceClientConfiguration.defaultConfiguration()); - assertThat(connectionFactory.getDatabase(), is(2)); + assertThat(connectionFactory.getDatabase()).isEqualTo(2); } @Test // DATAREDIS-574 @@ -478,8 +472,8 @@ public void shouldWriteStandaloneDatabaseIndex() { LettuceClientConfiguration.defaultConfiguration()); connectionFactory.setDatabase(3); - assertThat(connectionFactory.getDatabase(), is(3)); - assertThat(envConfig.getDatabase(), is(3)); + assertThat(connectionFactory.getDatabase()).isEqualTo(3); + assertThat(envConfig.getDatabase()).isEqualTo(3); } @Test // DATAREDIS-574 @@ -491,7 +485,7 @@ public void shouldReadSentinelDatabaseIndex() { LettuceConnectionFactory connectionFactory = new LettuceConnectionFactory(envConfig, LettuceClientConfiguration.defaultConfiguration()); - assertThat(connectionFactory.getDatabase(), is(2)); + assertThat(connectionFactory.getDatabase()).isEqualTo(2); } @Test // DATAREDIS-574 @@ -504,8 +498,8 @@ public void shouldWriteSentinelDatabaseIndex() { LettuceClientConfiguration.defaultConfiguration()); connectionFactory.setDatabase(3); - assertThat(connectionFactory.getDatabase(), is(3)); - assertThat(envConfig.getDatabase(), is(3)); + assertThat(connectionFactory.getDatabase()).isEqualTo(3); + assertThat(envConfig.getDatabase()).isEqualTo(3); } @Test // DATAREDIS-682 @@ -518,8 +512,8 @@ public void shouldWriteSocketDatabaseIndex() { LettuceClientConfiguration.defaultConfiguration()); connectionFactory.setDatabase(3); - assertThat(connectionFactory.getDatabase(), is(3)); - assertThat(envConfig.getDatabase(), is(3)); + assertThat(connectionFactory.getDatabase()).isEqualTo(3); + assertThat(envConfig.getDatabase()).isEqualTo(3); } @Test // DATAREDIS-574 @@ -541,14 +535,14 @@ public void shouldApplyClientConfiguration() { LettuceConnectionFactory connectionFactory = new LettuceConnectionFactory(new RedisStandaloneConfiguration(), configuration); - assertThat(connectionFactory.getClientConfiguration(), is(configuration)); + assertThat(connectionFactory.getClientConfiguration()).isEqualTo(configuration); - assertThat(connectionFactory.isUseSsl(), is(true)); - assertThat(connectionFactory.isVerifyPeer(), is(false)); - assertThat(connectionFactory.isStartTls(), is(true)); - assertThat(connectionFactory.getClientResources(), is(sharedClientResources)); - assertThat(connectionFactory.getTimeout(), is(Duration.ofMinutes(5).toMillis())); - assertThat(connectionFactory.getShutdownTimeout(), is(Duration.ofHours(2).toMillis())); + assertThat(connectionFactory.isUseSsl()).isTrue(); + assertThat(connectionFactory.isVerifyPeer()).isFalse(); + assertThat(connectionFactory.isStartTls()).isTrue(); + assertThat(connectionFactory.getClientResources()).isEqualTo(sharedClientResources); + assertThat(connectionFactory.getTimeout()).isEqualTo(Duration.ofMinutes(5).toMillis()); + assertThat(connectionFactory.getShutdownTimeout()).isEqualTo(Duration.ofHours(2).toMillis()); } @Test // DATAREDIS-574 @@ -558,9 +552,9 @@ public void shouldReturnStandaloneConfiguration() { LettuceConnectionFactory connectionFactory = new LettuceConnectionFactory(configuration, LettuceClientConfiguration.defaultConfiguration()); - assertThat(connectionFactory.getStandaloneConfiguration(), is(configuration)); - assertThat(connectionFactory.getSentinelConfiguration(), is(nullValue())); - assertThat(connectionFactory.getClusterConfiguration(), is(nullValue())); + assertThat(connectionFactory.getStandaloneConfiguration()).isEqualTo(configuration); + assertThat(connectionFactory.getSentinelConfiguration()).isNull(); + assertThat(connectionFactory.getClusterConfiguration()).isNull(); } @Test // DATAREDIS-682 @@ -570,10 +564,10 @@ public void shouldReturnSocketConfiguration() { LettuceConnectionFactory connectionFactory = new LettuceConnectionFactory(configuration, LettuceClientConfiguration.defaultConfiguration()); - assertThat(connectionFactory.getStandaloneConfiguration(), is(notNullValue())); - assertThat(connectionFactory.getSocketConfiguration(), is(configuration)); - assertThat(connectionFactory.getSentinelConfiguration(), is(nullValue())); - assertThat(connectionFactory.getClusterConfiguration(), is(nullValue())); + assertThat(connectionFactory.getStandaloneConfiguration()).isNotNull(); + assertThat(connectionFactory.getSocketConfiguration()).isEqualTo(configuration); + assertThat(connectionFactory.getSentinelConfiguration()).isNull(); + assertThat(connectionFactory.getClusterConfiguration()).isNull(); } @Test // DATAREDIS-574 @@ -583,9 +577,9 @@ public void shouldReturnSentinelConfiguration() { LettuceConnectionFactory connectionFactory = new LettuceConnectionFactory(configuration, LettuceClientConfiguration.defaultConfiguration()); - assertThat(connectionFactory.getStandaloneConfiguration(), is(notNullValue())); - assertThat(connectionFactory.getSentinelConfiguration(), is(configuration)); - assertThat(connectionFactory.getClusterConfiguration(), is(nullValue())); + assertThat(connectionFactory.getStandaloneConfiguration()).isNotNull(); + assertThat(connectionFactory.getSentinelConfiguration()).isEqualTo(configuration); + assertThat(connectionFactory.getClusterConfiguration()).isNull(); } @Test // DATAREDIS-574 @@ -595,9 +589,9 @@ public void shouldReturnClusterConfiguration() { LettuceConnectionFactory connectionFactory = new LettuceConnectionFactory(configuration, LettuceClientConfiguration.defaultConfiguration()); - assertThat(connectionFactory.getStandaloneConfiguration(), is(notNullValue())); - assertThat(connectionFactory.getSentinelConfiguration(), is(nullValue())); - assertThat(connectionFactory.getClusterConfiguration(), is(configuration)); + assertThat(connectionFactory.getStandaloneConfiguration()).isNotNull(); + assertThat(connectionFactory.getSentinelConfiguration()).isNull(); + assertThat(connectionFactory.getClusterConfiguration()).isEqualTo(configuration); } @Test(expected = IllegalStateException.class) // DATAREDIS-574 @@ -620,7 +614,7 @@ public void timeoutShouldBePassedOnToClusterConnection() { ConnectionFactoryTracker.add(connectionFactory); RedisClusterConnection clusterConnection = connectionFactory.getClusterConnection(); - assertThat(ReflectionTestUtils.getField(clusterConnection, "timeout"), is(equalTo(2000L))); + assertThat(ReflectionTestUtils.getField(clusterConnection, "timeout")).isEqualTo(2000L); clusterConnection.close(); } @@ -636,7 +630,7 @@ public void timeoutSetOnClientConfigShouldBePassedOnToClusterConnection() { ConnectionFactoryTracker.add(connectionFactory); RedisClusterConnection clusterConnection = connectionFactory.getClusterConnection(); - assertThat(ReflectionTestUtils.getField(clusterConnection, "timeout"), is(equalTo(2000L))); + assertThat(ReflectionTestUtils.getField(clusterConnection, "timeout")).isEqualTo(2000L); clusterConnection.close(); } @@ -681,11 +675,11 @@ public void databaseShouldBeSetCorrectlyOnSentinelClient() { ConnectionFactoryTracker.add(connectionFactory); AbstractRedisClient client = (AbstractRedisClient) getField(connectionFactory, "client"); - assertThat(client, instanceOf(RedisClient.class)); + assertThat(client).isInstanceOf(RedisClient.class); RedisURI redisUri = (RedisURI) getField(client, "redisURI"); - assertThat(redisUri.getDatabase(), is(equalTo(1))); + assertThat(redisUri.getDatabase()).isEqualTo(1); } @Test // DATAREDIS-949 @@ -703,9 +697,9 @@ public void maxRedirectsShouldBeSetOnClientOptions() { ClusterClientOptions options = (ClusterClientOptions) client.getOptions(); - assertThat(options.getMaxRedirects(), is(42)); - assertThat(options.isValidateClusterNodeMembership(), is(true)); - assertThat(options.getTimeoutOptions().isApplyConnectionTimeout(), is(true)); + assertThat(options.getMaxRedirects()).isEqualTo(42); + assertThat(options.isValidateClusterNodeMembership()).isTrue(); + assertThat(options.getTimeoutOptions().isApplyConnectionTimeout()).isTrue(); } @Test // DATAREDIS-949 @@ -726,9 +720,9 @@ public void maxRedirectsShouldBeSetOnClusterClientOptions() { ClusterClientOptions options = (ClusterClientOptions) client.getOptions(); - assertThat(options.getMaxRedirects(), is(42)); - assertThat(options.isValidateClusterNodeMembership(), is(false)); - assertThat(options.getTimeoutOptions().isApplyConnectionTimeout(), is(false)); + assertThat(options.getMaxRedirects()).isEqualTo(42); + assertThat(options.isValidateClusterNodeMembership()).isFalse(); + assertThat(options.getTimeoutOptions().isApplyConnectionTimeout()).isFalse(); } @Data