@Test
  public void testAccessingLongStat() {
    Statistics stats = setUpLongStatistics(1);

    assertThat(stats.getLong(statName1)).isEqualTo(0L);
    assertThat(stats.getInt(statName1)).isEqualTo(0);
    assertThatThrownBy(() -> stats.getDouble(statName1))
        .isExactlyInstanceOf(IllegalArgumentException.class);

    stats.setLong(statName1, 4L);
    assertThat(stats.getLong(statName1)).isEqualTo(4L);
    stats.setInt(statName1, 5);
    assertThat(stats.getLong(statName1)).isEqualTo(5L);
    assertThatThrownBy(() -> stats.setDouble(statName1, 4.0))
        .isExactlyInstanceOf(IllegalArgumentException.class);

    stats.incLong(statName1, 4L);
    assertThat(stats.getLong(statName1)).isEqualTo(9L);
    stats.incInt(statName1, 4);
    assertThat(stats.getLong(statName1)).isEqualTo(13L);
    assertThatThrownBy(() -> stats.incDouble(statName1, 4.0))
        .isExactlyInstanceOf(IllegalArgumentException.class);
  }
Tests that accessing a {@code long} stat throws the appropriate exceptions.
geode-core/src/integrationTest/java/org/apache/geode/internal/statistics/DistributedSystemStatisticsIntegrationTest.java