@Test(expected = ConstraintViolationException.class)
public void testCreateBucketWithMissingName() {

    final Bucket bucket = new Bucket();
    when(metadataService.getBucketsByName(bucket.getName())).thenReturn(Collections.emptyList());
    registryService.createBucket(bucket);
}