@Test public void testEquals() { assertFalse(getTestObject().equals(null)); assertFalse(getTestObject().equals("DummyString")); assertTrue(getTestObject().equals(getTestObject())); GUIDResponse sameObject = getTestObject(); assertTrue(sameObject.equals(sameObject)); GUIDResponse differentObject = getTestObject(); differentObject.setExceptionErrorMessage("Different"); assertFalse(getTestObject().equals(differentObject)); }
@Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof GUIDResponse)) { return false; } if (!super.equals(objectToCompare)) { return false; } GUIDResponse that = (GUIDResponse) objectToCompare; return Objects.equals(guid, that.guid); }
GUIDResponse extends FFDCResponseBase { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof GUIDResponse)) { return false; } if (!super.equals(objectToCompare)) { return false; } GUIDResponse that = (GUIDResponse) objectToCompare; return Objects.equals(guid, that.guid); } }
GUIDResponse extends FFDCResponseBase { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof GUIDResponse)) { return false; } if (!super.equals(objectToCompare)) { return false; } GUIDResponse that = (GUIDResponse) objectToCompare; return Objects.equals(guid, that.guid); } GUIDResponse();  GUIDResponse(GUIDResponse   template); }
GUIDResponse extends FFDCResponseBase { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof GUIDResponse)) { return false; } if (!super.equals(objectToCompare)) { return false; } GUIDResponse that = (GUIDResponse) objectToCompare; return Objects.equals(guid, that.guid); } GUIDResponse();  GUIDResponse(GUIDResponse   template); String getGUID(); void setGUID(String guid); @Override String toString(); @Override boolean equals(Object objectToCompare); @Override int hashCode(); }
GUIDResponse extends FFDCResponseBase { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof GUIDResponse)) { return false; } if (!super.equals(objectToCompare)) { return false; } GUIDResponse that = (GUIDResponse) objectToCompare; return Objects.equals(guid, that.guid); } GUIDResponse();  GUIDResponse(GUIDResponse   template); String getGUID(); void setGUID(String guid); @Override String toString(); @Override boolean equals(Object objectToCompare); @Override int hashCode();  }