@Test
public void scheduleHalfOpenStateTimeout_schedules_task_to_occur_after_resetTimeoutNanos_nanoseconds() {

    // given
    ScheduledExecutorService schedulerMock = mock(ScheduledExecutorService.class);
    Whitebox.setInternalState(cbSpy, "scheduler", schedulerMock);
    long resetTimeout = 42;
    Whitebox.setInternalState(cbSpy, "resetTimeoutNanos", resetTimeout);
    // when
    cbSpy.scheduleHalfOpenStateTimeout();
    // then
    verify(schedulerMock).schedule(any(Runnable.class), eq(resetTimeout), eq(TimeUnit.NANOSECONDS));
}