@Test
public void testGetFlowsByBucket() {

    final BucketEntity bucketEntity = metadataService.getBucketById("1");
    final List<FlowEntity> flows = metadataService.getFlowsByBucket(bucketEntity.getId());
    assertEquals(2, flows.size());
    final FlowEntity flowEntity = flows.stream().filter(f -> f.getId().equals("1")).findFirst().orElse(null);
    assertNotNull(flowEntity);
    assertEquals(3, flowEntity.getSnapshotCount());
}