private void addRunningOne(WorkflowInstance.Status status, WorkflowRollupOverview overview) {
    if (runningStats == null) {
      runningStats = new EnumMap<>(WorkflowInstance.Status.class);
    }
    runningStats.put(status, runningStats.getOrDefault(status, 0L) + 1);

    if (runningRollup == null) {
      runningRollup = new WorkflowRollupOverview();
    }
    runningRollup.aggregate(overview);
  }
@Test
  public void testAddRunningOne() throws Exception {
    ForeachStepOverview overview =
        loadObject(
            "fixtures/instances/sample-foreach-step-overview.json", ForeachStepOverview.class);
    WorkflowRollupOverview.CountReference ref = new WorkflowRollupOverview.CountReference();
    ref.setCnt(1);
    WorkflowRollupOverview rollupOverview =
        WorkflowRollupOverview.of(1, Collections.singletonMap(StepInstance.Status.RUNNING, ref));
    overview.addOne(80333, WorkflowInstance.Status.IN_PROGRESS, rollupOverview);
    assertEquals(
        207L, overview.getRunningStats().get(WorkflowInstance.Status.IN_PROGRESS).longValue());

    assertEquals(517L, overview.getRunningRollup().getTotalLeafCount());
    ref.setCnt(60);
    assertEquals(ref, overview.getRunningRollup().getOverview().get(StepInstance.Status.RUNNING));

    assertTrue(overview.statusExistInIterations(WorkflowInstance.Status.SUCCEEDED));
    assertFalse(overview.statusExistInIterations(WorkflowInstance.Status.FAILED));
    assertEquals(10116, overview.getRunningStatsCount(true));
    assertEquals(333, overview.getRunningStatsCount(false));
  }