### Question:
SoapCall { @Override public boolean equals(Object obj) { if (obj instanceof SoapCall) { SoapCall<?> other = (SoapCall<?>) obj; return Objects.equals(soapClient, other.soapClient) && Objects.equals(soapClientMethod, other.soapClientMethod) && Objects.deepEquals(soapArgs, other.soapArgs); } return false; } SoapCall(Method soapClientMethod, T soapClient, Object[] soapArgs); Method getSoapClientMethod(); T getSoapClient(); Object[] getSoapArgs(); @Override boolean equals(Object obj); @Override int hashCode();  }### Answer:
@Test public void testEquals() throws Exception { Method method1 = Object.class.getDeclaredMethod("equals", Object.class); Method method2 = Object.class.getDeclaredMethod("toString"); Object object1 = new Object(); Object[] objectArray = new Object[] {new Object()}; SoapCall<Object> soapCall1 = new SoapCall<Object>(method1, object1, objectArray); SoapCall<Object> soapCall2 = new SoapCall<Object>(method1, object1, objectArray); assertTrue(soapCall1.equals(soapCall2)); assertTrue(soapCall2.equals(soapCall1)); SoapCall<Object> soapCall3 = new SoapCall<Object>(method1, new Object(), objectArray); assertFalse(soapCall1.equals(soapCall3)); assertFalse(soapCall3.equals(soapCall1)); SoapCall<Object> soapCall4 = new SoapCall<Object>(method1, object1, new Object[] {}); assertFalse(soapCall1.equals(soapCall4)); assertFalse(soapCall4.equals(soapCall1)); SoapCall<Object> soapCall5 = new SoapCall<Object>(method2, object1, objectArray); assertFalse(soapCall1.equals(soapCall5)); assertFalse(soapCall5.equals(soapCall1)); }