@Test
public void testResolveBucketIdWhenNameIsSetButNotFound() throws Exception {

    C2NiFiRegistryClient client = createC2NiFiRegistryClient(null, matchingBucket.getName());
    when(bucketClient.getAll()).thenReturn(Arrays.asList(noNameBucket, nonMatchingBucket));
    assertFalse(client.resolveNiFiRegistryBucketId().isPresent());
}