@Test void threadCountIsCalculated() { when(this.threadBean.getThreadCount()).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.getMinThreadCount(), is(9)); assertThat(collector.getMaxThreadCount(), is(11)); assertThat(collector.getTotalThreadCount(), is(40)); }
int threadCount = this.getThreadBean().getThreadCount(); long totalStartedThreadCount = this.getThreadBean().getTotalStartedThreadCount();