@Test
    final void testUpdateWithNullThenDataThenNoDataThenData() {
        Bucket first = new Bucket();
        Bucket second = new Bucket();
        populateDimensionLessValue("first", first, 1.0d);
        populateDimensionLessValue("second", second, 2.0d);
        cache.updateDimensionPersistence(null, first);
        cache.updateDimensionPersistence(first, new Bucket());
        cache.updateDimensionPersistence(new Bucket(), second);
        assertEquals(2, second.entrySet().size());
        assertTrue(second.getAllMetricNames().contains("first"));
        assertTrue(second.getAllMetricNames().contains("second"));
    }
Functional test for point persistence layer.

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