@Test void totalStartedThreadCountIsCalculated() { when(this.threadBean.getTotalStartedThreadCount()).thenReturn(10L).thenReturn(9L).thenReturn(11L).thenReturn(10L); this.cut.gather(); this.cut.gather(); this.cut.gather(); this.cut.gather(); ThreadInformationData collector = (ThreadInformationData) this.cut.get(); assertThat(collector.getMinTotalStartedThreadCount(), is(9L)); assertThat(collector.getMaxTotalStartedThreadCount(), is(11L)); assertThat(collector.getTotalTotalStartedThreadCount(), is(40L)); }
int peakThreadCount = this.getThreadBean().getPeakThreadCount(); int threadCount = this.getThreadBean().getThreadCount(); long totalStartedThreadCount = this.getThreadBean().getTotalStartedThreadCount();