@Test
public void testFlowVersionedCreated() {

    final Event event = EventFactory.flowVersionCreated(versionedFlowSnapshot);
    event.validate();
    assertEquals(EventType.CREATE_FLOW_VERSION, event.getEventType());
    assertEquals(5, event.getFields().size());
    assertEquals(bucket.getIdentifier(), event.getField(EventFieldName.BUCKET_ID).getValue());
    assertEquals(versionedFlow.getIdentifier(), event.getField(EventFieldName.FLOW_ID).getValue());
    assertEquals(String.valueOf(versionedFlowSnapshot.getSnapshotMetadata().getVersion()),
            event.getField(EventFieldName.VERSION).getValue());
    assertEquals(versionedFlowSnapshot.getSnapshotMetadata().getAuthor(),
            event.getField(EventFieldName.USER).getValue());
    assertEquals(versionedFlowSnapshot.getSnapshotMetadata().getComments(),
            event.getField(EventFieldName.COMMENT).getValue());
}