@Test
	public void TestAcquireAndReleaseSameSize() throws IOException {
		mapEntryPool = new MapEntryFactoryImpl(testDir, "TestAcquireAndReleaseSameSize");
		
		MapEntry[] entries = new MapEntry[10];
		for(int i = 0; i < 10; i++) {
			entries[i] = mapEntryPool.acquire(1024);
		}
		
		assertTrue(mapEntryPool.getFreeEntryCount() == 0);
		assertTrue(mapEntryPool.getTotalEntryCount() == 10);
		assertTrue(mapEntryPool.getTotalUsedSlotSize() == 1024 * 10);
		assertTrue(mapEntryPool.getTotalRealUsedSlotSize() == 1024 * 10);
		assertTrue(mapEntryPool.getTotalFreeSlotSize() == 0);
		assertTrue(mapEntryPool.getTotalWastedSlotSize() == 0);
		assertTrue(mapEntryPool.getFreeEntryIndexSet().size() == 0);
		
		for(int i = 0; i < 5; i++) {
			mapEntryPool.release(entries[i]);
		}
		
		assertTrue(mapEntryPool.getFreeEntryCount() == 5);
		assertTrue(mapEntryPool.getTotalEntryCount() == 10);
		assertTrue(mapEntryPool.getTotalUsedSlotSize() == 1024 * 5);
		assertTrue(mapEntryPool.getTotalRealUsedSlotSize() == 1024 * 5);
		assertTrue(mapEntryPool.getTotalFreeSlotSize() == 1024 * 5);
		assertTrue(mapEntryPool.getTotalWastedSlotSize() == 0);
		assertTrue(mapEntryPool.getFreeEntryCountByIndex((1024 - 1) / 16) == 5);
		assertTrue(mapEntryPool.getTotalFreeSlotSizeByIndex((1024 - 1) / 16) == 1024 * 5);
		assertTrue(mapEntryPool.getFreeEntryIndexSet().size() == 1);
		
		for(int i = 5; i < 10; i++) {
			mapEntryPool.release(entries[i]);
		}
		
		assertTrue(mapEntryPool.getFreeEntryCount() == 10);
		assertTrue(mapEntryPool.getTotalEntryCount() == 10);
		assertTrue(mapEntryPool.getTotalUsedSlotSize() == 0);
		assertTrue(mapEntryPool.getTotalRealUsedSlotSize() == 0);
		assertTrue(mapEntryPool.getTotalFreeSlotSize() == 1024 * 10);
		assertTrue(mapEntryPool.getTotalWastedSlotSize() == 0);
		assertTrue(mapEntryPool.getFreeEntryCountByIndex((1024 - 1) / 16) == 10);
		assertTrue(mapEntryPool.getTotalFreeSlotSizeByIndex((1024 - 1) / 16) == 1024 * 10);
		assertTrue(mapEntryPool.getFreeEntryIndexSet().size() == 1);
		
		entries = new MapEntry[10];
		for(int i = 0; i < 10; i++) {
			entries[i] = mapEntryPool.acquire(513);
		}
		
		assertTrue(mapEntryPool.getFreeEntryCount() == 0);
		assertTrue(mapEntryPool.getTotalEntryCount() == 10);
		assertTrue(mapEntryPool.getTotalUsedSlotSize() == 1024 * 10);
		assertTrue(mapEntryPool.getTotalRealUsedSlotSize() == 513 * 10);
		assertTrue(mapEntryPool.getTotalFreeSlotSize() == 0);
		assertTrue(mapEntryPool.getTotalWastedSlotSize() == 511 * 10);
		assertTrue(mapEntryPool.getFreeEntryIndexSet().size() == 0);
		
		for(int i = 0; i < 10; i++) {
			mapEntryPool.release(entries[i]);
		}
		
		assertTrue(mapEntryPool.getFreeEntryCount() == 10);
		assertTrue(mapEntryPool.getTotalEntryCount() == 10);
		assertTrue(mapEntryPool.getTotalUsedSlotSize() == 0);
		assertTrue(mapEntryPool.getTotalRealUsedSlotSize() == 0);
		assertTrue(mapEntryPool.getTotalFreeSlotSize() == 1024 * 10);
		assertTrue(mapEntryPool.getTotalWastedSlotSize() == 0);
		assertTrue(mapEntryPool.getFreeEntryIndexSet().size() == 1);
		assertTrue(mapEntryPool.getFreeEntryIndexSet().contains(63)); // (length - 1) / 16
		
		entries = new MapEntry[10];
		for(int i = 0; i < 10; i++) {
			entries[i] = mapEntryPool.acquire(128);
		}
		
		assertTrue(mapEntryPool.getFreeEntryCount() == 10);
		assertTrue(mapEntryPool.getTotalEntryCount() == 20);
		assertTrue(mapEntryPool.getTotalUsedSlotSize() == 128 * 10);
		assertTrue(mapEntryPool.getTotalRealUsedSlotSize() == 128 * 10);
		assertTrue(mapEntryPool.getTotalFreeSlotSize() == 1024 * 10);
		assertTrue(mapEntryPool.getTotalWastedSlotSize() == 0);
		assertTrue(mapEntryPool.getFreeEntryIndexSet().size() == 1);
		assertTrue(mapEntryPool.getFreeEntryIndexSet().contains(63));
		
		for(int i = 0; i < 10; i++) {
			mapEntryPool.release(entries[i]);
		}
		
		assertTrue(mapEntryPool.getFreeEntryCount() == 20);
		assertTrue(mapEntryPool.getTotalEntryCount() == 20);
		assertTrue(mapEntryPool.getTotalUsedSlotSize() == 0);
		assertTrue(mapEntryPool.getTotalRealUsedSlotSize() == 0);
		assertTrue(mapEntryPool.getTotalFreeSlotSize() == (1024 + 128) * 10);
		assertTrue(mapEntryPool.getTotalWastedSlotSize() == 0);
		assertTrue(mapEntryPool.getFreeEntryIndexSet().size() == 2);
		assertTrue(mapEntryPool.getFreeEntryIndexSet().contains(63));
		assertTrue(mapEntryPool.getFreeEntryIndexSet().contains(7));
	}