@Test public void testEquals() { assertFalse(getTestObject().equals(null)); assertFalse(getTestObject().equals("DummyString")); assertTrue(getTestObject().equals(getTestObject())); LocationsResponse sameObject = getTestObject(); assertTrue(sameObject.equals(sameObject)); LocationsResponse differentObject = getTestObject(); differentObject.setExceptionErrorMessage("Different"); assertFalse(getTestObject().equals(differentObject)); }
@Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof LocationsResponse)) { return false; } if (!super.equals(objectToCompare)) { return false; } LocationsResponse that = (LocationsResponse) objectToCompare; return Objects.equals(responseObjects, that.responseObjects); }
LocationsResponse extends PagedResponse { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof LocationsResponse)) { return false; } if (!super.equals(objectToCompare)) { return false; } LocationsResponse that = (LocationsResponse) objectToCompare; return Objects.equals(responseObjects, that.responseObjects); } }
LocationsResponse extends PagedResponse { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof LocationsResponse)) { return false; } if (!super.equals(objectToCompare)) { return false; } LocationsResponse that = (LocationsResponse) objectToCompare; return Objects.equals(responseObjects, that.responseObjects); } LocationsResponse();  LocationsResponse(LocationsResponse template); }
LocationsResponse extends PagedResponse { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof LocationsResponse)) { return false; } if (!super.equals(objectToCompare)) { return false; } LocationsResponse that = (LocationsResponse) objectToCompare; return Objects.equals(responseObjects, that.responseObjects); } LocationsResponse();  LocationsResponse(LocationsResponse template); List<Location> getList(); void setList(List<Location> responseObjects); @Override String toString(); @Override boolean equals(Object objectToCompare); @Override int hashCode(); }
LocationsResponse extends PagedResponse { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof LocationsResponse)) { return false; } if (!super.equals(objectToCompare)) { return false; } LocationsResponse that = (LocationsResponse) objectToCompare; return Objects.equals(responseObjects, that.responseObjects); } LocationsResponse();  LocationsResponse(LocationsResponse template); List<Location> getList(); void setList(List<Location> responseObjects); @Override String toString(); @Override boolean equals(Object objectToCompare); @Override int hashCode();  }