### Question:
AdminServer extends Server { public AdminServer withChannel(String channelName, int nodePort) { if (adminService == null) { adminService = new AdminService(); } adminService.withChannel(channelName, nodePort); return this; }  AdminServer withChannel(String channelName, int nodePort); List<String> getChannelNames(); List<Channel> getChannels(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); AdminService createAdminService(); AdminService getAdminService();  }### Answer:
@Test public void whenChannelsLabelsAnnotationsAreTheSame_objectsAreEqual() { server1.withChannel("nap1", 0); server1.addPodLabel("label1", VALUE1); server1.addPodAnnotation("annotation1", VALUE2); server1.withChannel("nap2", 1); server2.withChannel("nap2", 1); server2.withChannel("nap1", 0); server2.addPodAnnotation("annotation1", VALUE2); server2.addPodLabel("label1", VALUE1); assertThat(server1, equalTo(server2)); }
@Test public void whenChannelsDifferByName_objectsAreNotEqual() { server1.withChannel("nap1", 0); server2.withChannel("nap2", 0); assertThat(server1, not(equalTo(server2))); }