ZookeeperConfiguration { public int getRetrySleepTime() { return this.retrySleepTime; } @JsonCreator  ZookeeperConfiguration(@JsonProperty("connectionString")String connectionString,
                                  @JsonProperty("leaderSelectorPath")String leaderSelectorPath,
                                  @JsonProperty("retrySleepTime")Integer retrySleepTime,
                                  @JsonProperty("numberOfRetries")Integer numberOfRetries); String getConnectionString(); int getRetrySleepTime(); int getNumberOfRetries(); String getLeaderSelectorPath(); static final int DEFAULT_RETRY_SLEEP_TIME; static final int DEFAULT_NUMBER_OF_RETRIES; }
@Test void test_default_retry_sleep_time() { ZookeeperConfiguration zookeeperConfiguration = new ZookeeperConfiguration("connection-string", "/leader-selector-path", null, null); Assertions.assertEquals(ZookeeperConfiguration.DEFAULT_RETRY_SLEEP_TIME, zookeeperConfiguration.getRetrySleepTime()); }
@Test void test_zero_retry_sleep_time() { ZookeeperConfiguration zookeeperConfiguration = new ZookeeperConfiguration("connection-string", "/leader-selector-path", 0, null); Assertions.assertEquals(ZookeeperConfiguration.DEFAULT_RETRY_SLEEP_TIME, zookeeperConfiguration.getRetrySleepTime()); }
@Test void test_negative_retry_sleep_time() { ZookeeperConfiguration zookeeperConfiguration = new ZookeeperConfiguration("connection-string", "/leader-selector-path", -1, null); Assertions.assertEquals(ZookeeperConfiguration.DEFAULT_RETRY_SLEEP_TIME, zookeeperConfiguration.getRetrySleepTime()); }
@Test void test_valid_retry_sleep_time() { Integer retrySleepTime = 5000; ZookeeperConfiguration zookeeperConfiguration = new ZookeeperConfiguration("connection-string", "/leader-selector-path", retrySleepTime, null); Assertions.assertEquals(retrySleepTime.intValue(), zookeeperConfiguration.getRetrySleepTime()); }