private void doDiskSpaceRequirementsTest(BlobStore store, int segmentsAllocated, int numSwapSegments) throws Exception {
    DiskSpaceRequirements requirements = store.getDiskSpaceRequirements();
    if (!isLogSegmented) {
      assertEquals(LOG_CAPACITY, requirements.getSegmentSizeInBytes());
      assertEquals(1 - segmentsAllocated, requirements.getSegmentsNeeded());
    } else {
      assertEquals(SEGMENT_CAPACITY, requirements.getSegmentSizeInBytes());
      assertEquals((LOG_CAPACITY / SEGMENT_CAPACITY) - segmentsAllocated, requirements.getSegmentsNeeded());
    }
    assertEquals(numSwapSegments, requirements.getSwapSegmentsInUse());
  }
Run the {@link BlobStore#getDiskSpaceRequirements()} test.
@param segmentsAllocated the number of segments currently used by the blob store.
@param numSwapSegments the number of swap segments currently used by the blob store.
@throws Exception
ambry-store/src/test/java/com/github/ambry/store/BlobStoreTest.java