@Test
public void testRetryStoragePolicyTransitionStorageHasNoBucketName()
{

    // Create a business object data key.
    BusinessObjectDataKey businessObjectDataKey =
        new BusinessObjectDataKey(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE, SUBPARTITION_VALUES,
            DATA_VERSION);
    // Create a storage policy key.
    StoragePolicyKey storagePolicyKey = new StoragePolicyKey(STORAGE_POLICY_NAMESPACE_CD, STORAGE_POLICY_NAME);
    // Create database entities required for testing with a storage not having S3 bucket name configured.
    businessObjectDataServiceTestHelper
        .createDatabaseEntitiesForRetryStoragePolicyTransitionTesting(businessObjectDataKey, storagePolicyKey, STORAGE_NAME, NO_S3_BUCKET_NAME,
            StorageUnitStatusEntity.ARCHIVING);
    // Try to execute a before step for the retry storage policy transition when the storage does not have an S3 bucket name configured.
    try
    {
        businessObjectDataRetryStoragePolicyTransitionHelper
            .retryStoragePolicyTransition(businessObjectDataKey, new BusinessObjectDataRetryStoragePolicyTransitionRequest(storagePolicyKey));
        fail();
    }
    catch (IllegalStateException e)
    {
        assertEquals(String.format("Attribute \"%s\" for \"%s\" storage must be configured.",
            configurationHelper.getProperty(ConfigurationValue.S3_ATTRIBUTE_NAME_BUCKET_NAME), STORAGE_NAME), e.getMessage());
    }
}