@Test public void testEquals() { setUpUriInfo(); JsonApiDocument result1 = new JsonApiDocument(dummyObj01, uriInfoMock); JsonApiDocument result2 = new JsonApiDocument(dummyObj01, uriInfoMock); JsonApiDocument resultOther = new JsonApiDocument(dummyObj42, uriInfoMock); Assert.assertEquals(result1, result2); Assert.assertNotEquals(resultOther, result1); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; JsonApiDocument that = (JsonApiDocument) o; return Objects.equals(links, that.links) && Objects.equals(uriInfo, that.uriInfo) && Objects.equals(data, that.data); }
JsonApiDocument implements Serializable, JsonLinks { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; JsonApiDocument that = (JsonApiDocument) o; return Objects.equals(links, that.links) && Objects.equals(uriInfo, that.uriInfo) && Objects.equals(data, that.data); } }
JsonApiDocument implements Serializable, JsonLinks { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; JsonApiDocument that = (JsonApiDocument) o; return Objects.equals(links, that.links) && Objects.equals(uriInfo, that.uriInfo) && Objects.equals(data, that.data); } JsonApiDocument(JsonApiError error);  JsonApiDocument(JsonApiIdentifiable entity,
						   UriInfo uriInfo);  JsonApiDocument(Collection<? extends JsonApiIdentifiable> entityCollection,
						   UriInfo uriInfo); }
JsonApiDocument implements Serializable, JsonLinks { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; JsonApiDocument that = (JsonApiDocument) o; return Objects.equals(links, that.links) && Objects.equals(uriInfo, that.uriInfo) && Objects.equals(data, that.data); } JsonApiDocument(JsonApiError error);  JsonApiDocument(JsonApiIdentifiable entity,
						   UriInfo uriInfo);  JsonApiDocument(Collection<? extends JsonApiIdentifiable> entityCollection,
						   UriInfo uriInfo); void setResourceCollectionURI(URI collectionURI); @JsonInclude(JsonInclude.Include.NON_NULL) JsonApiData getData(); @JsonInclude(JsonInclude.Include.NON_NULL) List<JsonApiError> getErrors(); @JsonInclude(JsonInclude.Include.NON_EMPTY) List<JsonApiResource> getIncluded(); boolean hasRelationshipTo(JsonApiIdentifiable entity); void restrictTo(String attribute); void addRelationship(String name, JsonApiIdentifiable entity, URI location); void addRelationship(String name, Collection<? extends JsonApiIdentifiable> entity, URI location); void addIncluded(JsonApiIdentifiable entity); @Override Map<String, URI> getLinks(); @Override void addLink(String name, URI ref); @Override URI getURI(); @Override boolean equals(Object o); @Override int hashCode(); }
JsonApiDocument implements Serializable, JsonLinks { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; JsonApiDocument that = (JsonApiDocument) o; return Objects.equals(links, that.links) && Objects.equals(uriInfo, that.uriInfo) && Objects.equals(data, that.data); } JsonApiDocument(JsonApiError error);  JsonApiDocument(JsonApiIdentifiable entity,
						   UriInfo uriInfo);  JsonApiDocument(Collection<? extends JsonApiIdentifiable> entityCollection,
						   UriInfo uriInfo); void setResourceCollectionURI(URI collectionURI); @JsonInclude(JsonInclude.Include.NON_NULL) JsonApiData getData(); @JsonInclude(JsonInclude.Include.NON_NULL) List<JsonApiError> getErrors(); @JsonInclude(JsonInclude.Include.NON_EMPTY) List<JsonApiResource> getIncluded(); boolean hasRelationshipTo(JsonApiIdentifiable entity); void restrictTo(String attribute); void addRelationship(String name, JsonApiIdentifiable entity, URI location); void addRelationship(String name, Collection<? extends JsonApiIdentifiable> entity, URI location); void addIncluded(JsonApiIdentifiable entity); @Override Map<String, URI> getLinks(); @Override void addLink(String name, URI ref); @Override URI getURI(); @Override boolean equals(Object o); @Override int hashCode();  }