@Test
  public void testLogSegmentValidDataSize() throws StoreException {
    assumeTrue(!bucketingEnabled);
    BlobStoreStats blobStoreStats = setupBlobStoreStats(0, 0);
    long currentTimeInMs = state.time.milliseconds();
    for (long i = 0; i <= currentTimeInMs + TEST_TIME_INTERVAL_IN_MS; i += TEST_TIME_INTERVAL_IN_MS) {
      TimeRange timeRange = new TimeRange(i, 0L);
      verifyAndGetLogSegmentValidSize(blobStoreStats, timeRange);
    }
    blobStoreStats.close();
  }
Basic test to verify reported valid size information per log segment by BlobStoreStats.
@throws StoreException
ambry-store/src/test/java/com/github/ambry/store/BlobStoreStatsTest.java