JsonApiResourceIdentifier implements JsonApiIdentifiable { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; JsonApiResourceIdentifier that = (JsonApiResourceIdentifier) o; return Objects.equals(id, that.id) && Objects.equals(type, that.type); } JsonApiResourceIdentifier(JsonApiIdentifiable entity);   JsonApiResourceIdentifier(String id, String type); @Override String getId(); @Override String getType(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void testEquals() { JsonApiResourceIdentifier result1 = new JsonApiResourceIdentifier(dummyObj); JsonApiResourceIdentifier result2 = new JsonApiResourceIdentifier(dummyObj); Assert.assertEquals(result1, result2); }