@Test
public void testUpdateBucket() {

    final BucketEntity bucket = metadataService.getBucketById("1");
    assertNotNull(bucket);
    assertFalse(bucket.isAllowExtensionBundleRedeploy());
    assertFalse(bucket.isAllowPublicRead());
    final String updatedName = bucket.getName() + " UPDATED";
    final String updatedDesc = bucket.getDescription() + "DESC";
    bucket.setName(updatedName);
    bucket.setDescription(updatedDesc);
    bucket.setAllowExtensionBundleRedeploy(true);
    bucket.setAllowPublicRead(true);
    metadataService.updateBucket(bucket);
    final BucketEntity updatedBucket = metadataService.getBucketById(bucket.getId());
    assertNotNull(updatedName);
    assertEquals(updatedName, updatedBucket.getName());
    assertEquals(updatedDesc, updatedBucket.getDescription());
    assertTrue(updatedBucket.isAllowExtensionBundleRedeploy());
    assertTrue(updatedBucket.isAllowPublicRead());
}