public void scheduleHeartbeat() {
    startedHeartbeat = executorService.schedule(heartbeatTask, DEFAULT_HEARTBEAT_PERIOD, TimeUnit.SECONDS);
  }
@Test
  public void scheduleHeartbeat_oneTaskIsScheduled() {
    underTest.scheduleHeartbeat();

    verify(executorService, Mockito.times(1))
      .schedule(any(HeartbeatTask.class), anyLong(), any());
  }