Cluster implements Comparable<Cluster> { public static Builder builder() { return new Builder(); } private  Cluster(
      String name,
      Optional<String> partitioner,
      Set<String> seedHosts,
      State state,
      LocalDate lastContact,
      ClusterProperties properties); static Builder builder(); Builder with(); static String toSymbolicName(String name); String getName(); Optional<String> getPartitioner(); Set<String> getSeedHosts(); int getJmxPort(); Optional<JmxCredentials> getJmxCredentials(); State getState(); LocalDate getLastContact(); ClusterProperties getProperties(); @Override int compareTo(Cluster other); @Override boolean equals(Object obj); @Override int hashCode(); static final int DEFAULT_JMX_PORT; }
@Test(expected = NullPointerException.class) public void testCreate_fail_0() { Cluster.builder() .withSeedHosts(ImmutableSet.of("127.0.0.1", "127.0.0.2")) .withPartitioner("murmur3") .withJmxPort(9999) .withState(Cluster.State.UNREACHABLE) .withLastContact(LocalDate.now().minusDays(1)) .build(); }
@Test(expected = NullPointerException.class) public void testCreate_fail_1() { Cluster.builder() .withName("test") .withPartitioner("murmur3") .withJmxPort(9999) .withState(Cluster.State.UNREACHABLE) .withLastContact(LocalDate.now().minusDays(1)) .build(); }
@Test(expected = IllegalArgumentException.class) public void testCreate_fail_2() { Cluster.builder() .withName("test") .withSeedHosts(ImmutableSet.of()) .withPartitioner("murmur3") .withJmxPort(9999) .withState(Cluster.State.UNREACHABLE) .withLastContact(LocalDate.now().minusDays(1)) .build(); }