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