@Test
void elapsed() {

    when(bean.getCollectionTime()).thenReturn(500L, 1000L, 3000L);
    assertThat(stat.elapsed()).isEqualTo(Duration.ZERO.toNanos());
    assertThat(stat.elapsed()).isEqualTo(Duration.ofMillis(500).toNanos());
    assertThat(stat.elapsed()).isEqualTo(Duration.ofMillis(2000).toNanos());
}