### Question:
PageList { void initBuffer( long pageRef ) { if ( getAddress( pageRef ) == 0L ) { long addr = memoryAllocator.allocateAligned( getCachePageSize(), bufferAlignment ); UnsafeUtil.putLong( offAddress( pageRef ), addr ); } } PageList( int pageCount, int cachePageSize, MemoryAllocator memoryAllocator, SwapperSet swappers,
              long victimPageAddress, long bufferAlignment );   PageList( PageList pageList );   }### Answer:
@Test public void initialisingBufferMustConsumeMemoryFromMemoryManager() { long initialUsedMemory = mman.usedMemory(); pageList.initBuffer( pageRef ); long resultingUsedMemory = mman.usedMemory(); int allocatedMemory = (int) (resultingUsedMemory - initialUsedMemory); assertThat( allocatedMemory, greaterThanOrEqualTo( pageSize ) ); assertThat( allocatedMemory, lessThanOrEqualTo( pageSize + ALIGNMENT ) ); }