@Test(expected = ResourceNotFoundException.class)
public void testCreateSnapshotBucketDoesNotExist() {

    when(metadataService.getBucketById(any(String.class))).thenReturn(null);
    final VersionedFlowSnapshot snapshot = createSnapshot();
    registryService.createFlowSnapshot(snapshot);
}