### Question:
BaseAllocator extends Accountant implements BufferAllocator { @Override public BufferAllocator newChildAllocator( final String name, final long initReservation, final long maxAllocation) { assertOpen(); final ChildAllocator childAllocator = new ChildAllocator(this, name, initReservation, maxAllocation); if (DEBUG) { synchronized (DEBUG_LOCK) { childAllocators.put(childAllocator, childAllocator); historicalLog.recordEvent("allocator[%s] created new child allocator[%s]", name, childAllocator.name); } } return childAllocator; } protected  BaseAllocator(
      final BaseAllocator parentAllocator,
      final String name,
      final long initReservation,
      final long maxAllocation); @Override void assertOpen(); @Override String getName(); @Override DrillBuf getEmpty(); @Override DrillBuf buffer(final int initialRequestSize); @Override DrillBuf buffer(final int initialRequestSize, BufferManager manager); @Override ByteBufAllocator getAsByteBufAllocator(); @Override BufferAllocator newChildAllocator(
      final String name,
      final long initReservation,
      final long maxAllocation); @Override AllocationReservation newReservation(); @Override synchronized void close(); @Override String toString(); @Override String toVerboseString(); static int nextPowerOfTwo(int val); static StringBuilder indent(StringBuilder sb, int indent); static boolean isDebug(); byte[] getIOBuffer(); @Override void read(DrillBuf buf, int length, InputStream in); DrillBuf read(int length, InputStream in); @Override void write(DrillBuf buf, OutputStream out); @Override void write(DrillBuf buf, int length, OutputStream out); static final String DEBUG_ALLOCATOR; static final int DEBUG_LOG_LENGTH; static final boolean DEBUG; }### Answer:
@Test public void testAllocator_manyAllocations() throws Exception { try(final RootAllocator rootAllocator = new RootAllocator(MAX_ALLOCATION)) { try(final BufferAllocator childAllocator = rootAllocator.newChildAllocator("manyAllocations", 0, MAX_ALLOCATION)) { allocateAndFree(childAllocator); } } }