@JsonIgnore
  boolean isForeachIterationRestartable(long iterationId) {
    return info.entrySet().stream()
        .filter(e -> (e.getKey().isTerminal()))
        .anyMatch(
            e -> {
              for (Interval interval : e.getValue()) {
                if (iterationId >= interval.start && iterationId <= interval.end) {
                  return true;
                }
              }
              return false;
            });
  }
@Test
  public void testIsForeachIterationRestartable() throws Exception {
    TestDetails testDetails =
        loadObject("fixtures/instances/sample-foreach-details.json", TestDetails.class);

    assertFalse(testDetails.test1.isForeachIterationRestartable(1));
    assertFalse(testDetails.test1.isForeachIterationRestartable(2));
    assertFalse(testDetails.test1.isForeachIterationRestartable(5));
    assertTrue(testDetails.test1.isForeachIterationRestartable(6));
    assertTrue(testDetails.test1.isForeachIterationRestartable(7));
    assertTrue(testDetails.test1.isForeachIterationRestartable(10));
    assertTrue(testDetails.test1.isForeachIterationRestartable(17));
    assertTrue(testDetails.test1.isForeachIterationRestartable(12));
  }