@Test
    final void requireThatOldDataIsForgotten() {
        Bucket first = new Bucket(); // "now" as timestamp
        populateDimensionLessValue("one", first, 2);
        cache.updateDimensionPersistence(first, new Bucket());
        Bucket second = new Bucket(17, 42); // really old timestamp
        populateDimensionLessValue("other", second, 3);
        Bucket third = new Bucket();
        populateDimensionLessValue("two", third, 4);
        cache.updateDimensionPersistence(second, third);
        Collection<String> names = third.getAllMetricNames();
        assertEquals(2, names.size());
        assertTrue(names.contains("one"));
        assertTrue(names.contains("two"));
    }
Functional test for point persistence layer.

@author Steinar Knutsen
container-core/src/test/java/com/yahoo/metrics/simple/DimensionsCacheTest.java