@Test
public void testValidateBusinessObjectDataSearchKeyMissingRequiredParameters()
{

    try
    {
        businessObjectDataSearchHelper.validateBusinessObjectDataSearchKey(null);
        fail();
    }
    catch (IllegalArgumentException e)
    {
        assertEquals("A business object data search key must be specified.", e.getMessage());
    }
    try
    {
        businessObjectDataSearchHelper.validateBusinessObjectDataSearchKey(
            new BusinessObjectDataSearchKey(BLANK_TEXT, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, NO_PARTITION_VALUE_FILTERS,
                NO_REGISTRATION_DATE_RANGE_FILTER, NO_ATTRIBUTE_VALUE_FILTERS, NO_FILTER_ON_LATEST_VALID_VERSION, NO_FILTER_ON_RETENTION_EXPIRATION));
        fail();
    }
    catch (IllegalArgumentException e)
    {
        assertEquals("A namespace must be specified.", e.getMessage());
    }
    try
    {
        businessObjectDataSearchHelper.validateBusinessObjectDataSearchKey(
            new BusinessObjectDataSearchKey(BDEF_NAMESPACE, BLANK_TEXT, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION,
                NO_PARTITION_VALUE_FILTERS, NO_REGISTRATION_DATE_RANGE_FILTER, NO_ATTRIBUTE_VALUE_FILTERS, NO_FILTER_ON_LATEST_VALID_VERSION,
                NO_FILTER_ON_RETENTION_EXPIRATION));
        fail();
    }
    catch (IllegalArgumentException e)
    {
        assertEquals("A business object definition name must be specified.", e.getMessage());
    }
    try
    {
        businessObjectDataSearchHelper.validateBusinessObjectDataSearchKey(
            new BusinessObjectDataSearchKey(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, Collections.singletonList(
                new PartitionValueFilter(PARTITION_KEY, NO_PARTITION_VALUES, NO_PARTITION_VALUE_RANGE, new LatestBeforePartitionValue(PARTITION_VALUE),
                    NO_LATEST_AFTER_PARTITION_VALUE)), NO_REGISTRATION_DATE_RANGE_FILTER, NO_ATTRIBUTE_VALUE_FILTERS, NO_FILTER_ON_LATEST_VALID_VERSION,
                NO_FILTER_ON_RETENTION_EXPIRATION));
        fail();
    }
    catch (IllegalArgumentException e)
    {
        assertEquals("Only partition values or partition range are supported in partition value filter.", e.getMessage());
    }
    try
    {
        businessObjectDataSearchHelper.validateBusinessObjectDataSearchKey(
            new BusinessObjectDataSearchKey(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, NO_PARTITION_VALUE_FILTERS,
                NO_REGISTRATION_DATE_RANGE_FILTER, Collections.singletonList(new AttributeValueFilter(BLANK_TEXT, EMPTY_STRING)),
                NO_FILTER_ON_LATEST_VALID_VERSION, NO_FILTER_ON_RETENTION_EXPIRATION));
        fail();
    }
    catch (IllegalArgumentException e)
    {
        assertEquals("Either attribute name or attribute value filter must be specified.", e.getMessage());
    }
}