private static Statistics statistics(Consumer<Statistics> preparation) {
    Statistics statistics = mock(Statistics.class);
    preparation.accept(statistics);
    return statistics;
  }
Creates a mock Statistics with the given preparation applied.
geode-core/src/test/java/org/apache/geode/internal/statistics/StatisticsRegistryTest.java