@Test
  public void sizeNotInPoolTest() throws Exception {
    alloc = constructAllocator();
    alloc.initializePool(
        Arrays.asList(new DiskSpaceRequirements(storeId0, 50, 2, 0), new DiskSpaceRequirements(storeId1, 21, 1, 0)));
    verifyPoolState(new ExpectedState().addStoreSeg(storeId0, 50, 2).addStoreSeg(storeId1, 21, 1));
    File f1 = allocateAndVerify(storeId0, "file1", 25, false);
    verifyPoolState(new ExpectedState().addStoreSeg(storeId0, 50, 2).addStoreSeg(storeId1, 21, 1));
    freeAndVerify(storeId0, f1, 25, false);
    verifyPoolState(
        new ExpectedState().addStoreSeg(storeId0, 25, 1).addStoreSeg(storeId0, 50, 2).addStoreSeg(storeId1, 21, 1));
    // try checking out same file again
    File f2 = allocateAndVerify(storeId0, "file2", 25, false);
    verifyPoolState(
        new ExpectedState().addStoreSeg(storeId0, 25, 0).addStoreSeg(storeId0, 50, 2).addStoreSeg(storeId1, 21, 1));
    freeAndVerify(storeId0, f2, 25, false);
    verifyPoolState(
        new ExpectedState().addStoreSeg(storeId0, 25, 1).addStoreSeg(storeId0, 50, 2).addStoreSeg(storeId1, 21, 1));
  }
Test allocation of file sizes that are not in the pool after the pool has been initialized.
@throws Exception
ambry-store/src/test/java/com/github/ambry/store/DiskSpaceAllocatorTest.java