@JsonIgnore
  public Set<Long> getSkippedIterationsWithCheckpoint() {
    Set<Long> skipList = new HashSet<>();
    if (restartInfo != null) {
      skipList.addAll(restartInfo);
    }
    if (details != null) {
      details.flatten(WorkflowInstance.Status::isTerminal).entrySet().stream()
          .flatMap(e -> e.getValue().stream())
          .filter(i -> i >= checkpoint)
          .forEach(skipList::add);
    }
    return skipList;
  }
@Test
  public void testGetSkippedIterationsWithCheckpoint() throws Exception {
    ForeachStepOverview overview =
        loadObject(
            "fixtures/instances/sample-foreach-step-overview.json", ForeachStepOverview.class);
    assertTrue(overview.getSkippedIterationsWithCheckpoint().isEmpty());

    overview.setCheckpoint(80115);
    assertEquals(Collections.singleton(80115L), overview.getSkippedIterationsWithCheckpoint());

    overview.addOne(123L, WorkflowInstance.Status.FAILED, null);
    overview.refreshDetail();
    overview.updateForRestart(
        123L, WorkflowInstance.Status.CREATED, WorkflowInstance.Status.FAILED, null);

    assertEquals(
        new HashSet<>(Arrays.asList(123L, 80115L)), overview.getSkippedIterationsWithCheckpoint());
  }