@Test
public void testValidateBusinessObjectDataSearchKey() throws Exception
{

    // Create a registration date range filter.
    XMLGregorianCalendar startRegistrationDate = DatatypeFactory.newInstance().newXMLGregorianCalendar("2018-04-01");
    XMLGregorianCalendar endRegistrationDate = DatatypeFactory.newInstance().newXMLGregorianCalendar("2018-04-02");
    RegistrationDateRangeFilter registrationDateRangeFilter = new RegistrationDateRangeFilter(startRegistrationDate, endRegistrationDate);
    // Create attribute value filters.
    List<AttributeValueFilter> attributeValueFilters =
        Arrays.asList(new AttributeValueFilter(ATTRIBUTE_NAME, ATTRIBUTE_VALUE), new AttributeValueFilter(ATTRIBUTE_NAME_2, ATTRIBUTE_VALUE_2));
    // Create a business object data search key.
    BusinessObjectDataSearchKey businessObjectDataSearchKey =
        new BusinessObjectDataSearchKey(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, NO_PARTITION_VALUE_FILTERS,
            registrationDateRangeFilter, attributeValueFilters, FILTER_ON_LATEST_VALID_VERSION, FILTER_ON_RETENTION_EXPIRATION);
    // Clone the original business object data search key to validate the results.
    BusinessObjectDataSearchKey originalBusinessObjectDataSearchKey = (BusinessObjectDataSearchKey) businessObjectDataSearchKey.clone();
    // Call the method under test.
    businessObjectDataSearchHelper.validateBusinessObjectDataSearchKey(businessObjectDataSearchKey);
    // Validate the results. We expect no changes to the business object data search key.
    assertEquals(originalBusinessObjectDataSearchKey, businessObjectDataSearchKey);
}