Cluster implements Comparable<Cluster> { public static String toSymbolicName(String name) { Preconditions.checkNotNull(name, "cannot turn null into symbolic name"); return name.toLowerCase().replaceAll("[^a-z0-9_\\-\\.]", ""); } 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 public void testGetSymbolicName() { assertEquals("example2cluster", Cluster.toSymbolicName("Example2 Cluster")); assertEquals("example2_cluster", Cluster.toSymbolicName("Example2_Cluster")); }