@Test
public void testAggregateMetrics() {

    FDBStoreTimer storeTimer = new FDBStoreTimer();
    // I don't want this test to fail if new aggregates are added, but do want to verify that the
    // getAggregates() at least does return some of the expected aggregates.
    assertTrue(storeTimer.getAggregates().contains(FDBStoreTimer.CountAggregates.BYTES_DELETED));
    storeTimer.increment(FDBStoreTimer.Counts.DELETE_RECORD_KEY_BYTES, 203);
    storeTimer.increment(FDBStoreTimer.Counts.DELETE_RECORD_VALUE_BYTES, 1000);
    storeTimer.increment(FDBStoreTimer.Counts.DELETE_INDEX_KEY_BYTES, 85);
    storeTimer.increment(FDBStoreTimer.Counts.DELETE_INDEX_VALUE_BYTES, 234);
    storeTimer.increment(FDBStoreTimer.Counts.REPLACE_RECORD_VALUE_BYTES, 100);
    assertNotNull(storeTimer.getCounter(FDBStoreTimer.CountAggregates.BYTES_DELETED));
    assertEquals(1622, storeTimer.getCount(FDBStoreTimer.CountAggregates.BYTES_DELETED),
            "Incorrect aggregate count for BYTES_DELETED");
    // Aggregate counters are immutable.
    assertThrows(RecordCoreException.class, () -> {
        storeTimer.getCounter(FDBStoreTimer.CountAggregates.BYTES_DELETED).increment(44);
    });
}