@Test
  public void testAccessingIntStat() {
    Statistics stats = setUpIntStatistics(1);

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

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

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