private static Consumer<Statistics> withUniqueId(long uniqueId) {
    return statistics -> when(statistics.getUniqueId()).thenReturn(uniqueId);
  }
Creates a consumer that assigns the given unique ID to a mock statistics.
geode-core/src/test/java/org/apache/geode/internal/statistics/StatisticsRegistryTest.java