@Test
public void testInvalidateUnregisteredBusinessObjectDataTrim() throws Exception
{

    BusinessObjectDataInvalidateUnregisteredRequest request =
        new BusinessObjectDataInvalidateUnregisteredRequest(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE,
            SUBPARTITION_VALUES, StorageEntity.MANAGED_STORAGE);
    // Given a business object format
    try
    {
        businessObjectFormatServiceTestHelper.createBusinessObjectFormat(request);
    }
    catch (Exception e)
    {
        throw new IllegalArgumentException("Test failed during setup. Most likely setup or developer error.", e);
    }
    // pad string values with white spaces
    request.setNamespace(BLANK_TEXT + request.getNamespace() + BLANK_TEXT);
    request.setBusinessObjectDefinitionName(BLANK_TEXT + request.getBusinessObjectDefinitionName() + BLANK_TEXT);
    request.setBusinessObjectFormatFileType(BLANK_TEXT + request.getBusinessObjectFormatFileType() + BLANK_TEXT);
    request.setBusinessObjectFormatUsage(BLANK_TEXT + request.getBusinessObjectFormatUsage() + BLANK_TEXT);
    request.setPartitionValue(BLANK_TEXT + request.getPartitionValue() + BLANK_TEXT);
    List<String> paddedSubPartitionValues = new ArrayList<>();
    for (String subPartitionValue : request.getSubPartitionValues())
    {
        paddedSubPartitionValues.add(BLANK_TEXT + subPartitionValue + BLANK_TEXT);
    }
    request.setSubPartitionValues(paddedSubPartitionValues);
    // Call the API
    BusinessObjectDataInvalidateUnregisteredResponse actualResponse =
        businessObjectDataInvalidateUnregisteredHelper.invalidateUnregisteredBusinessObjectData(request);
    // Make assertions
        /*
         * Note: The API will modify the request to now contain the trimmed value.
         */
    Assert.assertNotNull("response is null", actualResponse);
    Assert.assertEquals("response namespace", request.getNamespace(), actualResponse.getNamespace());
    Assert.assertEquals("response business object definition name", request.getBusinessObjectDefinitionName(),
        actualResponse.getBusinessObjectDefinitionName());
    Assert.assertEquals("response business object format usage", request.getBusinessObjectFormatUsage(), actualResponse.getBusinessObjectFormatUsage());
    Assert.assertEquals("response business object format file type", request.getBusinessObjectFormatFileType(),
        actualResponse.getBusinessObjectFormatFileType());
    Assert
        .assertEquals("response business object format version", request.getBusinessObjectFormatVersion(), actualResponse.getBusinessObjectFormatVersion());
    Assert.assertEquals("response partition value", request.getPartitionValue(), actualResponse.getPartitionValue());
    Assert.assertEquals("response sub-partition values", request.getSubPartitionValues(), actualResponse.getSubPartitionValues());
    Assert.assertEquals("response storage name", request.getStorageName(), actualResponse.getStorageName());
    Assert.assertNotNull("response business object datas is null", actualResponse.getRegisteredBusinessObjectDataList());
    Assert.assertEquals("response business object datas size", 0, actualResponse.getRegisteredBusinessObjectDataList().size());
}