@Test
public void testGetFlowEventWhenExists() throws ParseException {

    final String flowEventId = "4";
    final Optional<FDFlowEvent> flowEventOptional = flowManager.getFlowEvent(flowEventId);
    assertTrue(flowEventOptional.isPresent());
    final FDFlowEvent flowEvent = flowEventOptional.get();
    assertEquals(flowEventId, flowEvent.getIdentifier());
    assertEquals("2", flowEvent.getFlowIdentifier());
    assertEquals(new BigInteger("3"), flowEvent.getFlowRevision());
    Assert.assertEquals(FDFlowEventType.FLOW_PUBLISHED, flowEvent.getEventType());
    assertEquals("Created root process group", flowEvent.getEventDescription());
    Assert.assertEquals(FDFlowFormat.JACKSON_JSON_V1, flowEvent.getFlowFormat());
    assertEquals("root-group-2", flowEvent.getComponentId());
    assertEquals("system", flowEvent.getUserIdentity());
    final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS z");
    assertEquals(dateFormat.parse("2018-07-26 12:54:00.000 UTC").getTime(), flowEvent.getCreated().longValue());
    assertEquals(dateFormat.parse("2018-07-26 12:54:00.000 UTC").getTime(), flowEvent.getUpdated().longValue());
}