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