public void testPurgeExpiredAllCodepaths() throws Exception {
FixedHashKey k1 = new FixedHashKey(1, "a");
FixedHashKey k2 = new FixedHashKey(1, "b");
cl.write(marshalledEntry(k1, "value", null));
Metadata metadata = metadata(1000, null);
InternalMetadataImpl im = new InternalMetadataImpl(metadata, timeService.wallClockTime(), timeService.wallClockTime());
cl.write(marshalledEntry(k2, "value", im)); // will expire
for (int i = 0; i < 120; i++) {
cl.write(marshalledEntry(new FixedHashKey(i + 10, "non-exp k" + i), "value", null));
cl.write(marshalledEntry(new FixedHashKey(i + 10, "exp k" + i), "value", im)); // will expire
}