con.add(stmt2);
con.commit();
con.begin();
CacheEntry entry1 = new CacheEntry();
entry1.setExpiryDate(new Date(System.currentTimeMillis()+1000*60));
entry1.setLastRetrieved(new Date());
entry1.setUpdateCount(1);
entry1.setResource(subject1);
con.addCacheEntry(subject1, entry1);
con.commit();
Assert.assertEquals(1,asList(backend.listCacheEntries()).size());
Assert.assertEquals(0,asList(backend.listExpiredEntries()).size());
con.begin();
CacheEntry entry2 = new CacheEntry();
entry2.setExpiryDate(new Date(System.currentTimeMillis() - 1000 * 60));
entry2.setLastRetrieved(new Date());
entry2.setUpdateCount(1);
entry2.setResource(subject2);
con.addCacheEntry(subject2,entry2);
con.commit();
Assert.assertEquals(2,asList(backend.listCacheEntries()).size());