@Test
public void testUpdateBusinessObjectDataStatusMissingOptionalParameters()
{

    // Test if we can retrieve an attribute for the business object data with any allowed number of subpartition values (from 0 to MAX_SUBPARTITIONS).
    for (int i = 0; i <= BusinessObjectDataEntity.MAX_SUBPARTITIONS; i++)
    {
        // Build a list of subpartition values.
        List<String> subPartitionValues = SUBPARTITION_VALUES.subList(0, i);
        // Create a business object data key.
        BusinessObjectDataKey businessObjectDataKey =
            new BusinessObjectDataKey(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE, subPartitionValues,
                DATA_VERSION);
        // Create a business object data status update request.
        BusinessObjectDataStatusUpdateRequest businessObjectDataStatusUpdateRequest = new BusinessObjectDataStatusUpdateRequest(BDATA_STATUS_2);
        // Create a business object data status update response.
        BusinessObjectDataStatusUpdateResponse businessObjectDataStatusUpdateResponse =
            new BusinessObjectDataStatusUpdateResponse(businessObjectDataKey, BDATA_STATUS_2, BDATA_STATUS);
        // Mock the external calls.
        when(businessObjectDataStatusService.updateBusinessObjectDataStatus(businessObjectDataKey, businessObjectDataStatusUpdateRequest))
            .thenReturn(businessObjectDataStatusUpdateResponse);
        // Call the relative method under test.
        BusinessObjectDataStatusUpdateResponse result = null;
        switch (i)
        {
            case 0:
                result = businessObjectDataStatusRestController
                    .updateBusinessObjectDataStatus(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE,
                        DATA_VERSION, businessObjectDataStatusUpdateRequest);
                break;
            case 1:
                result = businessObjectDataStatusRestController
                    .updateBusinessObjectDataStatus(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE,
                        subPartitionValues.get(0), DATA_VERSION, businessObjectDataStatusUpdateRequest);
                break;
            case 2:
                result = businessObjectDataStatusRestController
                    .updateBusinessObjectDataStatus(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE,
                        subPartitionValues.get(0), subPartitionValues.get(1), DATA_VERSION, businessObjectDataStatusUpdateRequest);
                break;
            case 3:
                result = businessObjectDataStatusRestController
                    .updateBusinessObjectDataStatus(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE,
                        subPartitionValues.get(0), subPartitionValues.get(1), subPartitionValues.get(2), DATA_VERSION,
                        businessObjectDataStatusUpdateRequest);
                break;
            case 4:
                result = businessObjectDataStatusRestController
                    .updateBusinessObjectDataStatus(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE,
                        subPartitionValues.get(0), subPartitionValues.get(1), subPartitionValues.get(2), subPartitionValues.get(3), DATA_VERSION,
                        businessObjectDataStatusUpdateRequest);
                break;
        }
        // Verify the external calls.
        verify(businessObjectDataStatusService).updateBusinessObjectDataStatus(businessObjectDataKey, businessObjectDataStatusUpdateRequest);
        verify(notificationEventService)
            .processBusinessObjectDataNotificationEventAsync(NotificationEventTypeEntity.EventTypesBdata.BUS_OBJCT_DATA_STTS_CHG, businessObjectDataKey,
                BDATA_STATUS_2, BDATA_STATUS);
        verifyNoMoreInteractionsHelper();
        // Validate the results.
        assertEquals(businessObjectDataStatusUpdateResponse, result);
    }
}