@Test
public void testRetryStoragePolicyTransitionMissingRequiredParameters()
{

    // 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);
    // Try to execute a before step for the retry storage policy transition without specifying business object definition name.
    try
    {
        businessObjectDataRetryStoragePolicyTransitionHelper.retryStoragePolicyTransition(
            new BusinessObjectDataKey(BDEF_NAMESPACE, BLANK_TEXT, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE,
                SUBPARTITION_VALUES, DATA_VERSION), new BusinessObjectDataRetryStoragePolicyTransitionRequest(storagePolicyKey));
        fail();
    }
    catch (IllegalArgumentException e)
    {
        assertEquals("A business object definition name must be specified.", e.getMessage());
    }
    // Try to execute a before step for the retry storage policy transition without specifying business object format usage.
    try
    {
        businessObjectDataRetryStoragePolicyTransitionHelper.retryStoragePolicyTransition(
            new BusinessObjectDataKey(BDEF_NAMESPACE, BDEF_NAME, BLANK_TEXT, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE, SUBPARTITION_VALUES,
                DATA_VERSION), new BusinessObjectDataRetryStoragePolicyTransitionRequest(storagePolicyKey));
        fail();
    }
    catch (IllegalArgumentException e)
    {
        assertEquals("A business object format usage must be specified.", e.getMessage());
    }
    // Try to execute a before step for the retry storage policy transition without specifying business object format file type.
    try
    {
        businessObjectDataRetryStoragePolicyTransitionHelper.retryStoragePolicyTransition(
            new BusinessObjectDataKey(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, BLANK_TEXT, FORMAT_VERSION, PARTITION_VALUE, SUBPARTITION_VALUES,
                DATA_VERSION), new BusinessObjectDataRetryStoragePolicyTransitionRequest(storagePolicyKey));
        fail();
    }
    catch (IllegalArgumentException e)
    {
        assertEquals("A business object format file type must be specified.", e.getMessage());
    }
    // Try to execute a before step for the retry storage policy transition without specifying business object format version.
    try
    {
        businessObjectDataRetryStoragePolicyTransitionHelper.retryStoragePolicyTransition(
            new BusinessObjectDataKey(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, NO_FORMAT_VERSION, PARTITION_VALUE,
                SUBPARTITION_VALUES, DATA_VERSION), new BusinessObjectDataRetryStoragePolicyTransitionRequest(storagePolicyKey));
        fail();
    }
    catch (IllegalArgumentException e)
    {
        assertEquals("A business object format version must be specified.", e.getMessage());
    }
    // Try to execute a before step for the retry storage policy transition without specifying primary partition value.
    try
    {
        businessObjectDataRetryStoragePolicyTransitionHelper.retryStoragePolicyTransition(
            new BusinessObjectDataKey(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, BLANK_TEXT, SUBPARTITION_VALUES,
                DATA_VERSION), new BusinessObjectDataRetryStoragePolicyTransitionRequest(storagePolicyKey));
        fail();
    }
    catch (IllegalArgumentException e)
    {
        assertEquals("A partition value must be specified.", e.getMessage());
    }
    // Try to execute a before step for the retry storage policy transition without specifying 1st subpartition value.
    try
    {
        businessObjectDataRetryStoragePolicyTransitionHelper.retryStoragePolicyTransition(
            new BusinessObjectDataKey(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE,
                Arrays.asList(BLANK_TEXT, SUBPARTITION_VALUES.get(1), SUBPARTITION_VALUES.get(2), SUBPARTITION_VALUES.get(3)), DATA_VERSION),
            new BusinessObjectDataRetryStoragePolicyTransitionRequest(storagePolicyKey));
        fail();
    }
    catch (IllegalArgumentException e)
    {
        assertEquals("A subpartition value must be specified.", e.getMessage());
    }
    // Try to execute a before step for the retry storage policy transition without specifying 2nd subpartition value.
    try
    {
        businessObjectDataRetryStoragePolicyTransitionHelper.retryStoragePolicyTransition(
            new BusinessObjectDataKey(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE,
                Arrays.asList(SUBPARTITION_VALUES.get(0), BLANK_TEXT, SUBPARTITION_VALUES.get(2), SUBPARTITION_VALUES.get(3)), DATA_VERSION),
            new BusinessObjectDataRetryStoragePolicyTransitionRequest(storagePolicyKey));
        fail();
    }
    catch (IllegalArgumentException e)
    {
        assertEquals("A subpartition value must be specified.", e.getMessage());
    }
    // Try to execute a before step for the retry storage policy transition without specifying 3rd subpartition value.
    try
    {
        businessObjectDataRetryStoragePolicyTransitionHelper.retryStoragePolicyTransition(
            new BusinessObjectDataKey(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE,
                Arrays.asList(SUBPARTITION_VALUES.get(0), SUBPARTITION_VALUES.get(1), BLANK_TEXT, SUBPARTITION_VALUES.get(3)), DATA_VERSION),
            new BusinessObjectDataRetryStoragePolicyTransitionRequest(storagePolicyKey));
        fail();
    }
    catch (IllegalArgumentException e)
    {
        assertEquals("A subpartition value must be specified.", e.getMessage());
    }
    // Try to execute a before step for the retry storage policy transition without specifying 4th subpartition value.
    try
    {
        businessObjectDataRetryStoragePolicyTransitionHelper.retryStoragePolicyTransition(
            new BusinessObjectDataKey(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE,
                Arrays.asList(SUBPARTITION_VALUES.get(0), SUBPARTITION_VALUES.get(1), SUBPARTITION_VALUES.get(2), BLANK_TEXT), DATA_VERSION),
            new BusinessObjectDataRetryStoragePolicyTransitionRequest(storagePolicyKey));
        fail();
    }
    catch (IllegalArgumentException e)
    {
        assertEquals("A subpartition value must be specified.", e.getMessage());
    }
    // Try to execute a before step for the retry storage policy transition without specifying business object data version.
    try
    {
        businessObjectDataRetryStoragePolicyTransitionHelper.retryStoragePolicyTransition(
            new BusinessObjectDataKey(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE,
                SUBPARTITION_VALUES, NO_DATA_VERSION), new BusinessObjectDataRetryStoragePolicyTransitionRequest(storagePolicyKey));
        fail();
    }
    catch (IllegalArgumentException e)
    {
        assertEquals("A business object data version must be specified.", e.getMessage());
    }
    // Try to execute a before step for the retry storage policy transition
    // without specifying a business object data retry storage policy transition request.
    try
    {
        businessObjectDataRetryStoragePolicyTransitionHelper.retryStoragePolicyTransition(businessObjectDataKey, null);
        fail();
    }
    catch (IllegalArgumentException e)
    {
        assertEquals("A business object data retry storage policy transition request must be specified.", e.getMessage());
    }
    // Try to execute a before step for the retry storage policy transition without specifying a storage policy key.
    try
    {
        businessObjectDataRetryStoragePolicyTransitionHelper
            .retryStoragePolicyTransition(businessObjectDataKey, new BusinessObjectDataRetryStoragePolicyTransitionRequest(null));
        fail();
    }
    catch (IllegalArgumentException e)
    {
        assertEquals("A storage policy key must be specified.", e.getMessage());
    }
    // Try to execute a before step for the retry storage policy transition without specifying storage policy namespace.
    try
    {
        businessObjectDataRetryStoragePolicyTransitionHelper.retryStoragePolicyTransition(businessObjectDataKey,
            new BusinessObjectDataRetryStoragePolicyTransitionRequest(new StoragePolicyKey(BLANK_TEXT, STORAGE_POLICY_NAME)));
        fail();
    }
    catch (IllegalArgumentException e)
    {
        assertEquals("A namespace must be specified.", e.getMessage());
    }
    // Try to execute a before step for the retry storage policy transition without specifying storage policy name.
    try
    {
        businessObjectDataRetryStoragePolicyTransitionHelper.retryStoragePolicyTransition(businessObjectDataKey,
            new BusinessObjectDataRetryStoragePolicyTransitionRequest(new StoragePolicyKey(STORAGE_POLICY_NAMESPACE_CD, BLANK_TEXT)));
        fail();
    }
    catch (IllegalArgumentException e)
    {
        assertEquals("A storage policy name must be specified.", e.getMessage());
    }
}