### Question:
ClassDeployment implements Deployment { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ClassDeployment that = (ClassDeployment) o; if (!consumers.equals(that.consumers)) return false; if (!services.equals(that.services)) return false; return coreServices.equals(that.coreServices); } ClassDeployment(Class<?> ...deploymentClasses); @Override Set<Class<?>> getCoreServices(); @Override Set<Class<?>> getServices(); @Override Set<Class<?>> getConsumers(); @Override ClassLoader getClassLoader(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void equalsReflexiveTest(){ ClassDeployment d1 = new ClassDeployment(TestCoreService1.class, TestQueue1.class, TestQueue2.class, TestService1.class, TestTopic1.class); assertTrue(d1.equals(d1)); }
@Test public void equalsSymmetricTrueTest(){ ClassDeployment d1 = new ClassDeployment(TestCoreService1.class, TestQueue1.class, TestQueue2.class, TestService1.class, TestTopic1.class); ClassDeployment d2 = new ClassDeployment(TestCoreService1.class, TestQueue1.class, TestQueue2.class, TestService1.class, TestTopic1.class); assertTrue(d1.equals(d2)); assertTrue(d2.equals(d1)); }
@Test public void equalsSymmetricFalseTest1(){ ClassDeployment d1 = new ClassDeployment(TestCoreService1.class, TestQueue1.class, TestQueue2.class, TestService1.class, TestTopic1.class); ClassDeployment d2 = new ClassDeployment(TestCoreService1.class, TestQueue1.class, TestService1.class, TestTopic1.class); assertFalse(d1.equals(d2)); assertFalse(d2.equals(d1)); }
@Test public void equalsSymmetricFalseTest2(){ ClassDeployment d1 = new ClassDeployment(TestCoreService1.class, TestQueue1.class, TestQueue2.class, TestService1.class, TestTopic1.class); ClassDeployment d2 = new ClassDeployment(TestCoreService1.class, TestQueue1.class, TestQueue2.class, TestTopic1.class, TestTopic1.class); assertFalse(d1.equals(d2)); assertFalse(d2.equals(d1)); }
@Test public void equalsTransitiveTest(){ ClassDeployment d1 = new ClassDeployment(TestCoreService1.class, TestQueue1.class, TestQueue2.class, TestService1.class, TestTopic1.class); ClassDeployment d2 = new ClassDeployment(TestCoreService1.class, TestQueue1.class, TestQueue2.class, TestService1.class, TestTopic1.class); ClassDeployment d3 = new ClassDeployment(TestCoreService1.class, TestQueue1.class, TestQueue2.class, TestService1.class, TestTopic1.class); assertTrue(d1.equals(d2)); assertTrue(d2.equals(d3)); assertTrue(d1.equals(d3)); }
@Test public void equalsNullReferenceTest(){ ClassDeployment d1 = new ClassDeployment(TestCoreService1.class, TestQueue1.class, TestQueue2.class, TestService1.class, TestTopic1.class); assertFalse(d1.equals(null)); }