SesameModelWrapper extends AbstractStatementSet implements Model { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o instanceof SesameModelWrapper) { SesameModelWrapper model = (SesameModelWrapper) o; return Models.isomorphic(this.sesameModel, model.getSesameModel()); } return false; } protected  SesameModelWrapper(); protected  SesameModelWrapper(org.eclipse.rdf4j.model.Model model); @Override boolean add(@Nonnull Resource subject, @Nonnull IRI predicate, @Nonnull Value object, Resource... context); @Override boolean clear(Resource... context); @Override boolean contains(Resource subject, IRI predicate, Value object, Resource... context); @Override Model filter(Resource subject, IRI predicate, Value object, Resource... context); @Override Set<Namespace> getNamespaces(); @Override boolean remove(Resource subject, IRI predicate, Value object, Resource... context); @Override Optional<Namespace> removeNamespace(@Nonnull String prefix); @Override void setNamespace(@Nonnull Namespace namespace); @Override Namespace setNamespace(@Nonnull String prefix, @Nonnull String name); @Override Model unmodifiable(); @Override int size(); @Override boolean isEmpty(); @Override boolean contains(@Nonnull Object o); @Override @Nonnull Iterator<Statement> iterator(); @Override boolean add(@Nonnull Statement statement); @Override boolean remove(@Nonnull Object o); @Override void clear(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void testEquals() { IRI s = new SimpleIRI("http: IRI p = new SimpleIRI("http: IRI o = new SimpleIRI("http: Literal o2 = new SimpleLiteral("Mobi"); BNode b = new SimpleBNode("_:mobi1"); BNode b2 = new SimpleBNode("_:mobi2"); IRI c1 = new SimpleIRI("http: SesameModelWrapper model1 = new SesameModelWrapper(new LinkedHashModel()); SesameModelWrapper model2 = new SesameModelWrapper(new LinkedHashModel()); SesameModelWrapper model3 = new SesameModelWrapper(new LinkedHashModel()); SesameModelWrapper model4 = new SesameModelWrapper(new LinkedHashModel()); SesameModelWrapper model5 = new SesameModelWrapper(new LinkedHashModel()); SesameModelWrapper model6 = new SesameModelWrapper(new LinkedHashModel()); SesameModelWrapper model7 = new SesameModelWrapper(new LinkedHashModel()); SesameModelWrapper model8 = new SesameModelWrapper(new LinkedHashModel()); model1.add(s, p, o); model2.add(s, p, o); model3.add(s, p, o); model3.add(s, p, o, c1); model4.add(s, p, o); model4.add(s, p, o, c1); model5.add(s, p, o); model5.add(s, p, b); model5.add(b, p, o2); model6.add(s, p, o); model6.add(s, p, b); model6.add(b, p, o2); model7.add(s, p, b); model7.add(b, p, o2); model8.add(s, p, b2); model8.add(b2, p, o2); assertEquals(model1, model2); assertEquals(model3, model4); assertNotEquals(model1, model3); assertEquals(model5, model6); assertEquals(model7, model8); }