JsonApiDocument implements Serializable, JsonLinks { public boolean hasRelationshipTo(JsonApiIdentifiable entity) { return data.hasRelationshipTo(entity); } 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();  }
@Test public void hasRelationshipTo() { setUpUriInfo(); JsonApiDocument document = new JsonApiDocument(dummyObj01, uriInfoMock); document.addRelationship("rel1", dummyObj42, uri); Assert.assertTrue(document.hasRelationshipTo(dummyObj42)); Assert.assertFalse(document.hasRelationshipTo(dummyObj43)); }