@Test
public void testFindFlowIdsVarSince() throws Exception {

    Thread.sleep(2L); // isolate from other tests
    Flow flow = persistFlow("blah");
    Date d1 = flow.getCreationTime();
    Date d2 = new Date(d1.getTime() + 1L);
    Date d3 = new Date(d1.getTime() - 1L);
    testTransactionManager.commitTransaction();
    testTransactionManager.beginTransaction();
    List<Long> ids = flowRepository.findFlowIds(new FlowFinderCriteria(d1, null, "test"));
    assertEquals(1, ids.size());
    assertTrue(ids.contains(flow.getIdentifier()));
    ids = flowRepository.findFlowIds(new FlowFinderCriteria(d1, d1, "test"));
    assertEquals(1, ids.size());
    assertTrue(ids.contains(flow.getIdentifier()));
    ids = flowRepository.findFlowIds(new FlowFinderCriteria(d1, d2, "test"));
    assertEquals(1, ids.size());
    assertTrue(ids.contains(flow.getIdentifier()));
    ids = flowRepository.findFlowIds(new FlowFinderCriteria(d1, d3, "test"));
    assertEquals(0, ids.size());
    ids = flowRepository.findFlowIds(new FlowFinderCriteria(d1, null, "wrong"));
    assertEquals(0, ids.size());
    ids = flowRepository.findFlowIds(new FlowFinderCriteria(d2, null, "test"));
    assertEquals(0, ids.size());
}