public void testQueryOfOldVersion_shouldWork() throws Exception {
Map<String, EDBObjectEntry> data1v1 = new HashMap<String, EDBObjectEntry>();
putValue("pre:KeyA", "pre:Value A 1", data1v1);
putValue("pre:KeyB", "pre:Value A 1", data1v1);
EDBObject v11 = new EDBObject("pre:/test/object1", data1v1);
EDBCommit ci = getEDBCommit();
ci.insert(v11);
Map<String, EDBObjectEntry> data2v1 = new HashMap<String, EDBObjectEntry>();
putValue("pre:KeyA", "pre:Value A 2", data2v1);
putValue("pre:KeyB", "pre:Value A 1", data2v1);
EDBObject v12 = new EDBObject("pre:/test/object2", data2v1);
ci.insert(v12);
Map<String, EDBObjectEntry> data3v1 = new HashMap<String, EDBObjectEntry>();
putValue("pre:KeyA", "pre:Value A 3", data3v1);
putValue("pre:KeyB", "pre:Value A 1", data3v1);
EDBObject v13 = new EDBObject("pre:/test/object3", data3v1);
ci.insert(v13);
long time1 = db.commit(ci);
Map<String, EDBObjectEntry> data1v2 = new HashMap<String, EDBObjectEntry>();
putValue("pre:KeyA", "pre:Value A 1", data1v2);
putValue("pre:KeyB", "pre:Value A 1", data1v2);
EDBObject v21 = new EDBObject("pre:/test/object1", data1v2);
ci = getEDBCommit();
ci.update(v21);
Map<String, EDBObjectEntry> data2v2 = new HashMap<String, EDBObjectEntry>();
putValue("pre:KeyA", "pre:Value A 2", data2v2);
putValue("pre:KeyB", "pre:Value A 1", data2v2);
EDBObject v22 = new EDBObject("pre:/test/object2", data2v2);
ci.update(v22);
Map<String, EDBObjectEntry> data4v1 = new HashMap<String, EDBObjectEntry>();
putValue("pre:KeyA", "pre:Value A 4", data4v1);
putValue("pre:KeyB", "pre:Value A 1", data4v1);
EDBObject v23 = new EDBObject("pre:/test/object4", data4v1);
ci.update(v23);
long time2 = db.commit(ci);
Map<String, EDBObjectEntry> data1v3 = new HashMap<String, EDBObjectEntry>();
putValue("pre:KeyA", "pre:Value A 1", data1v3);
putValue("pre:KeyB", "pre:Value A 1", data1v3);
EDBObject v31 = new EDBObject("pre:/test/object1", data1v3);
ci = getEDBCommit();
ci.update(v31);
Map<String, EDBObjectEntry> data2v3 = new HashMap<String, EDBObjectEntry>();
putValue("pre:KeyA", "pre:Value A 2a", data2v3);
putValue("pre:KeyB", "pre:Value A 1", data2v3);
EDBObject v32 = new EDBObject("pre:/test/object2", data2v3);
ci.update(v32);
Map<String, EDBObjectEntry> data4v2 = new HashMap<String, EDBObjectEntry>();
putValue("pre:KeyA", "pre:Value A 4", data4v2);
putValue("pre:KeyB", "pre:Value A 1", data4v2);
EDBObject v33 = new EDBObject("pre:/test/object4", data4v2);
ci.update(v33);
long time3 = db.commit(ci);
List<EDBObject> result = db.query(QueryRequest.query("pre:KeyB", "pre:Value A 1")
.setTimestamp(time2));