@Test
  public void netstatStatsTest() throws Exception {
    long expectedSyncookiesSent = 1L;
    long expectedSyncookiesRecv = 2L;
    long expectedListenOverflows = 3L;
    long expectedListenDrops = 4L;

    // This file simulates the contents of the /proc/net/netstat file, omitting all stats that
    // aren't parsed in the LinuxProcFsStatistics.getNetStatStats() method and including a dummy
    // stat that should not be parsed
    String mockNetstatStats =
        LinuxSystemStatsTest.class.getResource("mockNetstatStats.txt").getFile();
    LinuxProcFsStatistics.refreshSystem(localStats,
        LinuxSystemStatsTest.class.getResource("100PercentStealTime.txt").getFile(),
        mockNetstatStats);

    Statistics statistics = getStatisticsManager().findStatisticsByTextId("LinuxSystemStats")[0];
    assertThat(statistics.getLong(TCP_EXT_SYN_COOKIES_SENT)).isEqualTo(expectedSyncookiesSent);
    assertThat(statistics.getLong(TCP_EXT_SYN_COOKIES_RECV)).isEqualTo(expectedSyncookiesRecv);
    assertThat(statistics.getLong(TCP_EXT_LISTEN_OVERFLOWS)).isEqualTo(expectedListenOverflows);
    assertThat(statistics.getLong(TCP_EXT_LISTEN_DROPS)).isEqualTo(expectedListenDrops);
  }
Technically a linux only test - the file handling is all mocked up so the test can run on any
host os.
geode-core/src/integrationTest/java/org/apache/geode/internal/statistics/LinuxSystemStatsTest.java