@Test void daemonThreadCountIsCalculated() { when(this.threadBean.getDaemonThreadCount()).thenReturn(10).thenReturn(9).thenReturn(11).thenReturn(10); this.cut.gather(); this.cut.gather(); this.cut.gather(); this.cut.gather(); ThreadInformationData collector = (ThreadInformationData) this.cut.get(); assertThat(collector.getMinDaemonThreadCount(), is(9)); assertThat(collector.getMaxDaemonThreadCount(), is(11)); assertThat(collector.getTotalDaemonThreadCount(), is(40)); }
int daemonThreadCount = this.getThreadBean().getDaemonThreadCount(); int peakThreadCount = this.getThreadBean().getPeakThreadCount(); int threadCount = this.getThreadBean().getThreadCount();