@Test
public void testResolveBucketIdWhenNameIsSet() throws Exception {

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