@Test
public void testGetBusinessObjectDataStatusMissingOptionalParameters()
{

    // Test if we can get status for the business object data without specifying optional parameters
    // and 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, null, PARTITION_VALUE, subPartitionValues, null);
        // Create a delimited list of sub-partition values.
        String delimitedSubPartitionValues = String.join("|", subPartitionValues);
        // Create a business object data status information.
        BusinessObjectDataStatusInformation businessObjectDataStatusInformation =
            new BusinessObjectDataStatusInformation(businessObjectDataKey, BDATA_STATUS);
        // Mock the external calls.
        when(herdStringHelper.splitStringWithDefaultDelimiterEscaped(delimitedSubPartitionValues)).thenReturn(subPartitionValues);
        when(businessObjectDataStatusService.getBusinessObjectDataStatus(businessObjectDataKey, BLANK_TEXT))
            .thenReturn(businessObjectDataStatusInformation);
        // Call the method under test.
        BusinessObjectDataStatusInformation result = businessObjectDataStatusRestController
            .getBusinessObjectDataStatus(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, BLANK_TEXT, PARTITION_VALUE,
                delimitedSubPartitionValues, null, null);
        // Verify the external calls.
        verify(herdStringHelper).splitStringWithDefaultDelimiterEscaped(delimitedSubPartitionValues);
        verify(businessObjectDataStatusService).getBusinessObjectDataStatus(businessObjectDataKey, BLANK_TEXT);
        verifyNoMoreInteractionsHelper();
        // Validate the results.
        assertEquals(businessObjectDataStatusInformation, result);
    }
}