ZookeeperConfiguration { public int getNumberOfRetries() { return this.numberOfRetries; } @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_number_of_retries() { ZookeeperConfiguration zookeeperConfiguration = new ZookeeperConfiguration("connection-string", "/leader-selector-path", null, null); Assertions.assertEquals(ZookeeperConfiguration.DEFAULT_NUMBER_OF_RETRIES, zookeeperConfiguration.getNumberOfRetries()); }
@Test void test_zero_number_of_retries() { ZookeeperConfiguration zookeeperConfiguration = new ZookeeperConfiguration("connection-string", "/leader-selector-path", null, 0); Assertions.assertEquals(ZookeeperConfiguration.DEFAULT_NUMBER_OF_RETRIES, zookeeperConfiguration.getNumberOfRetries()); }
@Test void test_negative_number_of_retries() { ZookeeperConfiguration zookeeperConfiguration = new ZookeeperConfiguration("connection-string", "/leader-selector-path", null, -1); Assertions.assertEquals(ZookeeperConfiguration.DEFAULT_NUMBER_OF_RETRIES, zookeeperConfiguration.getNumberOfRetries()); }
@Test void test_valid_number_of_retries() { Integer numberOfRetries = 3; ZookeeperConfiguration zookeeperConfiguration = new ZookeeperConfiguration("connection-string", "/leader-selector-path", null, numberOfRetries); Assertions.assertEquals(numberOfRetries.intValue(), zookeeperConfiguration.getNumberOfRetries()); }