List<Version> list2 = Iterations.asList(connection.listVersions(date2,date3));
Assert.assertEquals("there should be exactly one version from "+date2+" to "+date3,1,list2.size());
Assert.assertEquals("contents of version differ", version2, list2.get(0));
Assert.assertEquals("version id is not 2", 2L, (long)list2.get(0).getId());
List<Version> list3 = Iterations.asList(connection.listVersions(date3,new Date()));
Assert.assertEquals("there should be no version from "+date3+" to now",0,list3.size());
List<Version> list4 = Iterations.asList(connection.listVersions(date1,date3));
Assert.assertEquals("there should be exactly two versions from "+date1+" to "+date3,2,list4.size());
Assert.assertEquals("contents of version1 differ", version1, list4.get(0));