### Question:
SpillSpaceTracker { public SpillSpaceTracker(DataSize maxSize) { requireNonNull(maxSize, "maxSize is null"); maxBytes = maxSize.toBytes(); currentBytes = 0; } SpillSpaceTracker(DataSize maxSize); synchronized ListenableFuture<?> reserve(long bytes); synchronized void free(long bytes); @Managed synchronized long getCurrentBytes(); @Managed synchronized long getMaxBytes(); @Override synchronized String toString();  }### Answer:
@Test public void testSpillSpaceTracker() { assertEquals(spillSpaceTracker.getCurrentBytes(), 0); assertEquals(spillSpaceTracker.getMaxBytes(), MAX_DATA_SIZE.toBytes()); long reservedBytes = DataSize.of(5, MEGABYTE).toBytes(); spillSpaceTracker.reserve(reservedBytes); assertEquals(spillSpaceTracker.getCurrentBytes(), reservedBytes); long otherReservedBytes = DataSize.of(2, MEGABYTE).toBytes(); spillSpaceTracker.reserve(otherReservedBytes); assertEquals(spillSpaceTracker.getCurrentBytes(), (reservedBytes + otherReservedBytes)); spillSpaceTracker.reserve(otherReservedBytes); assertEquals(spillSpaceTracker.getCurrentBytes(), (reservedBytes + 2 * otherReservedBytes)); spillSpaceTracker.free(otherReservedBytes); spillSpaceTracker.free(otherReservedBytes); assertEquals(spillSpaceTracker.getCurrentBytes(), reservedBytes); spillSpaceTracker.free(reservedBytes); assertEquals(spillSpaceTracker.getCurrentBytes(), 0); }