@Test
public void testCreateFlowSnapshot() {

    final FlowSnapshotEntity flowSnapshot = new FlowSnapshotEntity();
    flowSnapshot.setFlowId("1");
    flowSnapshot.setVersion(4);
    flowSnapshot.setCreated(new Date());
    flowSnapshot.setCreatedBy("test-user");
    flowSnapshot.setComments("Comments");
    metadataService.createFlowSnapshot(flowSnapshot);
    final FlowSnapshotEntity createdFlowSnapshot = metadataService.getFlowSnapshot(flowSnapshot.getFlowId(), flowSnapshot.getVersion());
    assertNotNull(createdFlowSnapshot);
    assertEquals(flowSnapshot.getFlowId(), createdFlowSnapshot.getFlowId());
    assertEquals(flowSnapshot.getVersion(), createdFlowSnapshot.getVersion());
    assertEquals(flowSnapshot.getComments(), createdFlowSnapshot.getComments());
    assertEquals(flowSnapshot.getCreated().getTime(), createdFlowSnapshot.getCreated().getTime());
    assertEquals(flowSnapshot.getCreatedBy(), createdFlowSnapshot.getCreatedBy());
}