@Test
public void testWhenMetadataAwareAndDatabaseNotEmptyShouldNotSynchronize() {

    final BucketEntity bucketEntity = new BucketEntity();
    bucketEntity.setId("1");
    when(metadataService.getAllBuckets()).thenReturn(Collections.singletonList(bucketEntity));
    synchronizer.synchronize();
    verify(metadataService, times(0)).createBucket(any(BucketEntity.class));
    verify(metadataService, times(0)).createFlow(any(FlowEntity.class));
    verify(metadataService, times(0)).createFlowSnapshot(any(FlowSnapshotEntity.class));
}