@Test
public void testGetFlowEventsWhenFlowExists() {

    final String flowId = "2";
    final List<FDFlowEvent> flowEvents = flowManager.getFlowEvents(flowId);
    assertEquals(3, flowEvents.size());
    BigInteger prevRevision = new BigInteger("-1");
    for (final FDFlowEvent flowEvent : flowEvents) {
        assertEquals(flowId, flowEvent.getFlowIdentifier());
        assertNotNull(flowEvent.getIdentifier());
        assertNotNull(flowEvent.getFlowRevision());
        assertNotNull(flowEvent.getComponentId());
        assertNotNull(flowEvent.getCreated());
        assertNotNull(flowEvent.getUpdated());
        assertNotNull(flowEvent.getUserIdentity());
        assertNotNull(flowEvent.getEventType());
        assertNotNull(flowEvent.getEventDescription());
        assertNotNull(flowEvent.getFlowFormat());
        // Verify event revisions are in increasing order
        assertEquals(1, flowEvent.getFlowRevision().compareTo(prevRevision));
        prevRevision = flowEvent.getFlowRevision();
    }
}