commitObjects(inserts, Arrays.asList(object), null);
}
@Test
public void testCommitEDBObjectsUpdate_shouldWork() throws Exception {
EDBObject object = new EDBObject("/commit/test/update/1");
object.putEDBObjectEntry("testkey", "testvalue");
List<EDBObject> objects = new ArrayList<EDBObject>();
objects.add(object);
commitObjects(objects, null, null);
EDBObject first = db.getObject("/commit/test/update/1");
objects.clear();
object.putEDBObjectEntry("testkey", "testvalue1");
objects.add(object);
commitObjects(null, objects, null);
EDBObject second = db.getObject("/commit/test/update/1");
assertThat(first.getObject(EDBConstants.MODEL_VERSION, Integer.class), is(1));
assertThat(first.getString("testkey"), is("testvalue"));
assertThat(second.getObject(EDBConstants.MODEL_VERSION, Integer.class), is(2));
assertThat(second.getString("testkey"), is("testvalue1"));
}