ResourceObjectSupport implements ResourceObject { @Override public void update() throws RepositoryException { ObjectConnection connection = getObjectConnection(); connection.refresh(this); }  @Override String getTriples(RDFFormat format); @Override String getTriples(RDFFormat format, int maxPathLength, Resource... contexts); @Override void setResource(Resource resource); @ParameterTypes({}) Resource getResource(ObjectMessage msg); @Override void setResourceAsString(String resourceAsString); String getResourceAsString(); @Override void delete(); @Override void update();  }
@Test public void testRefreshing() throws Exception { Anno4j anno4j = new Anno4j(new SailRepository(new MemoryStore()), null, false); Person a = anno4j.createObject(Person.class, (Resource) new URIImpl("http: a.setMbox("alice@example.org"); Person b = anno4j.createObject(Person.class, (Resource) new URIImpl("http: b.setMbox("bob@example.org"); a.update(); assertEquals("bob@example.org", a.getMbox()); }