@JsonIgnore
  public long getFirstRestartIterationId() {
    if (restartInfo != null && !restartInfo.isEmpty()) {
      return restartInfo.stream().min(Long::compare).get();
    }
    return 0;
  }
@Test
  public void testGetFirstRestartIterationId() throws Exception {
    ForeachStepOverview overview =
        loadObject(
            "fixtures/instances/sample-foreach-step-overview.json", ForeachStepOverview.class);
    assertEquals(0, overview.getFirstRestartIterationId());

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

    assertEquals(23L, overview.getFirstRestartIterationId());
  }