@Test
public void testCreateFlow() {

    final String bucketId = "1";
    final FlowEntity flow = new FlowEntity();
    flow.setId(UUID.randomUUID().toString());
    flow.setBucketId(bucketId);
    flow.setName("Test Flow 1");
    flow.setDescription("Description for Test Flow 1");
    flow.setCreated(new Date());
    flow.setModified(new Date());
    flow.setType(BucketItemEntityType.FLOW);
    metadataService.createFlow(flow);
    final FlowEntity createdFlow = metadataService.getFlowById(flow.getId());
    assertNotNull(flow);
    assertEquals(flow.getId(), createdFlow.getId());
    assertEquals(flow.getBucketId(), createdFlow.getBucketId());
    assertEquals(flow.getName(), createdFlow.getName());
    assertEquals(flow.getDescription(), createdFlow.getDescription());
    assertEquals(flow.getCreated().getTime(), createdFlow.getCreated().getTime());
    assertEquals(flow.getModified(), createdFlow.getModified());
    assertEquals(flow.getType(), createdFlow.getType());
}