@Test
public void testCopy() {

  ClusterSpec cluster = ClusterSpec.builder().build();
  DataCenterSpec dc =
      cluster
          .addDataCenter()
          .withName("dc2")
          .withCassandraVersion("1.2.19")
          .withDSEVersion("5.1.0")
          .withPeerInfo("hello", "world")
          .build();
  dc.addNode().build();
  dc.addNode().build();
  DataCenterSpec dc2 = cluster.addDataCenter().copy(dc).build();
  assertThat(dc2.getId()).isEqualTo(dc.getId());
  assertThat(dc2.getName()).isEqualTo(dc.getName());
  assertThat(dc2.getCassandraVersion()).isEqualTo(dc.getCassandraVersion());
  assertThat(dc2.getPeerInfo()).isEqualTo(dc.getPeerInfo());
  // Nodes should not be copied.
  assertThat(dc2.getNodes()).isEmpty();
}