@Test
public void getOldWorkflowIdsReturnPassiveWorkflowsModifiedBeforeGivenTimeOrderedById() {

  List<Long> expectedIds = new ArrayList<>();
  storeActiveWorkflow(archiveTime1);
  storeActiveWorkflow(prodTime1);
  storePassiveWorkflow(prodTime2);
  expectedIds.add(storePassiveWorkflow(archiveTime1));
  expectedIds.add(storePassiveWorkflow(archiveTime2));
  List<Long> oldWorkflowIds = maintenanceDao.getOldWorkflowIds(MAIN, archiveTimeLimit, 10, emptySet());
  assertArrayEquals(oldWorkflowIds.toArray(), expectedIds.toArray());
}