@Test
public void testWhenMetadataAwareAndHasDataShouldSynchronize() {

    when(metadataService.getAllBuckets()).thenReturn(Collections.emptyList());
    synchronizer.synchronize();
    verify(metadataService, times(1)).createBucket(any(BucketEntity.class));
    verify(metadataService, times(1)).createFlow(any(FlowEntity.class));
    verify(metadataService, times(2)).createFlowSnapshot(any(FlowSnapshotEntity.class));
}