@Test void peakThreadCountIsCalculated() { when(this.threadBean.getPeakThreadCount()).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.getMinPeakThreadCount(), is(9)); assertThat(collector.getMaxPeakThreadCount(), is(11)); assertThat(collector.getTotalPeakThreadCount(), is(40)); }
int peakThreadCount = this.getThreadBean().getPeakThreadCount(); int threadCount = this.getThreadBean().getThreadCount(); long totalStartedThreadCount = this.getThreadBean().getTotalStartedThreadCount();