@Test public void testObjectOverrides() throws UnknownHostException { ClusterDescription description = new ClusterDescription( Multiple, Unknown, Arrays.asList( ServerDescription.builder() .state(Connecting) .address(new ServerAddress("loc:27019")) .build(), ServerDescription.builder() .state(Connecting) .address(new ServerAddress("loc:27018")) .build(), ServerDescription.builder() .state(Connecting) .address(new ServerAddress("loc:27017")) .build())); ClusterDescription descriptionTwo = new ClusterDescription( Multiple, Unknown, Arrays.asList( ServerDescription.builder() .state(Connecting) .address(new ServerAddress("loc:27019")) .build(), ServerDescription.builder() .state(Connecting) .address(new ServerAddress("loc:27018")) .build(), ServerDescription.builder() .state(Connecting) .address(new ServerAddress("loc:27017")) .build())); assertEquals(description, descriptionTwo); assertEquals(description.hashCode(), descriptionTwo.hashCode()); assertTrue(description.toString().startsWith("ClusterDescription")); }