directMemoryPointerThree.free();
}
@Test
public void testAddThreePutMiddleToTopChangePointer() {
ODirectMemoryPointer directMemoryPointerOne = new ODirectMemoryPointer(1);
ODirectMemoryPointer directMemoryPointerTwo = new ODirectMemoryPointer(1);
ODirectMemoryPointer directMemoryPointerThree = new ODirectMemoryPointer(1);
ODirectMemoryPointer directMemoryPointerFour = new ODirectMemoryPointer(1);
OCachePointer cachePointerOne = new OCachePointer(directMemoryPointerOne, new OLogSequenceNumber(0, 0));
OCachePointer cachePointerTwo = new OCachePointer(directMemoryPointerTwo, new OLogSequenceNumber(0, 0));
OCachePointer cachePointerThree = new OCachePointer(directMemoryPointerThree, new OLogSequenceNumber(0, 0));
OCachePointer cachePointerFour = new OCachePointer(directMemoryPointerFour, new OLogSequenceNumber(0, 0));
lruList.putToMRU(new OCacheEntry(1, 10, cachePointerOne, false));
lruList.putToMRU(new OCacheEntry(1, 20, cachePointerTwo, false));
lruList.putToMRU(new OCacheEntry(3, 30, cachePointerThree, false));
lruList.putToMRU(new OCacheEntry(1, 20, cachePointerFour, false));
Assert.assertEquals(lruList.size(), 3);
Iterator<OCacheEntry> entryIterator = lruList.iterator();
Assert.assertTrue(entryIterator.hasNext());
Assert.assertEquals(entryIterator.next(), new OCacheEntry(1, 20, cachePointerFour, false));
Assert.assertEquals(entryIterator.next(), new OCacheEntry(3, 30, cachePointerThree, false));
Assert.assertEquals(entryIterator.next(), new OCacheEntry(1, 10, cachePointerOne, false));
directMemoryPointerOne.free();
directMemoryPointerTwo.free();
directMemoryPointerThree.free();
directMemoryPointerFour.free();
}