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

    when(metadataService.getBucketById(any(String.class))).thenReturn(null);
    registryService.getBucket("does-not-exist");
}