### Question:
CheckpointRangeSource implements Iterator<CheckpointRange> { @Override public boolean hasNext() { return !retrievedRanges.isEmpty() || (requestFailureCount < checkpointTimeoutsPermitted && syncTargetChecker.shouldContinueDownloadingFromSyncTarget(peer, lastRangeEnd) && !reachedEndOfCheckpoints); } CheckpointRangeSource(
      final CheckpointHeaderFetcher checkpointFetcher,
      final SyncTargetChecker syncTargetChecker,
      final EthScheduler ethScheduler,
      final EthPeer peer,
      final BlockHeader commonAncestor,
      final int checkpointTimeoutsPermitted);   CheckpointRangeSource(
      final CheckpointHeaderFetcher checkpointFetcher,
      final SyncTargetChecker syncTargetChecker,
      final EthScheduler ethScheduler,
      final EthPeer peer,
      final BlockHeader commonAncestor,
      final int checkpointTimeoutsPermitted,
      final Duration newHeaderWaitDuration); @Override boolean hasNext(); @Override CheckpointRange next();  }### Answer:
@Test public void shouldHaveNextWhenNoCheckpointsLoadedButSyncTargetCheckerSaysToContinue() { when(syncTargetChecker.shouldContinueDownloadingFromSyncTarget(peer, commonAncestor)) .thenReturn(true); assertThat(source).hasNext(); }