### Question:
DomainStatus { public DomainStatus addServer(ServerStatus server) { synchronized (servers) { for (ListIterator<ServerStatus> it = servers.listIterator(); it.hasNext(); ) { if (Objects.equals(it.next().getServerName(), server.getServerName())) { it.remove(); } } servers.add(server); Collections.sort(servers); } return this; } DomainStatus();  DomainStatus(DomainStatus that); @Nonnull List<DomainCondition> getConditions(); DomainStatus addCondition(DomainCondition newCondition); boolean hasConditionWith(Predicate<DomainCondition> predicate); void removeConditionIf(Predicate<DomainCondition> predicate); String getMessage(); void setMessage(String message); DomainStatus withMessage(String message); String getReason(); void setReason(String reason); DomainStatus withReason(String reason); Integer getReplicas(); void setReplicas(Integer replicas); DomainStatus withReplicas(Integer replicas); List<ServerStatus> getServers(); void setServers(List<ServerStatus> servers); DomainStatus withServers(List<ServerStatus> servers); DomainStatus addServer(ServerStatus server); List<ClusterStatus> getClusters(); void setClusters(List<ClusterStatus> clusters); DomainStatus addCluster(ClusterStatus cluster); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object other); void createPatchFrom(JsonPatchBuilder builder, @Nullable DomainStatus oldStatus);  }### Answer:
@Test public void whenHasServerStatusWithHealth_cloneIsEqual() { domainStatus.addServer(new ServerStatus().withHealth(new ServerHealth().withOverallHealth("peachy"))); DomainStatus clone = new DomainStatus(this.domainStatus); assertThat(clone, equalTo(domainStatus)); }
@Test public void whenHasServerStatusWithoutHealth_cloneIsEqual() { domainStatus.addServer(new ServerStatus().withServerName("myserver")); DomainStatus clone = new DomainStatus(this.domainStatus); assertThat(clone, equalTo(domainStatus)); }