@Test
  public void testAccessingDoubleStat() {
    Statistics stats = setUpDoubleStatistics(1);

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

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

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