private Statistics setUpLongStatistics(final int count) {
    String[] descriptions = new String[] {"ONE", "TWO", "THREE"};
    StatisticDescriptor[] descriptors = new StatisticDescriptor[count];
    for (int i = 0; i < count; i++) {
      descriptors[i] = factory().createLongGauge(statNames[i], descriptions[i], "x");
    }

    StatisticsType type = factory().createType(getUniqueName(), "", descriptors);
    Statistics stats = factory().createStatistics(type, "Display");

    for (int i = 0; i < count; i++) {
      stats.setLong(statNames[i], 0L);
    }
    return stats;
  }
Tests that accessing an {@code double} stat throws the appropriate exceptions.
geode-core/src/integrationTest/java/org/apache/geode/internal/statistics/DistributedSystemStatisticsIntegrationTest.java