SystemPoller { public SystemPoller(List<VespaService> services, int pollingIntervalSecs) { this.services = services; this.pollingIntervalSecs = pollingIntervalSecs; systemPollTimer = new Timer("systemPollTimer", true); } SystemPoller(List<VespaService> services, int pollingIntervalSecs); void schedule();  }
@Test public void testSystemPoller() { DummyService s = new DummyService(0, "id"); List<VespaService> services = new ArrayList<>(); services.add(s); SystemPoller poller = new SystemPoller(services, 60*5); assertThat(s.isAlive(), is(false)); long n = poller.getPidJiffies(s); assertThat(n, is(0L)); long[] memusage = poller.getMemoryUsage(s); assertThat(memusage[0], is(0L)); assertThat(memusage[1], is(0L)); }