@Test
public void testBusinessObjectDataKeyToString()
{

    // Create test business object data key.
    BusinessObjectDataKey testBusinessObjectDataKey = new BusinessObjectDataKey();
    testBusinessObjectDataKey.setNamespace(NAMESPACE);
    testBusinessObjectDataKey.setBusinessObjectDefinitionName(BDEF_NAME);
    testBusinessObjectDataKey.setBusinessObjectFormatUsage(FORMAT_USAGE_CODE);
    testBusinessObjectDataKey.setBusinessObjectFormatFileType(FORMAT_FILE_TYPE_CODE);
    testBusinessObjectDataKey.setBusinessObjectFormatVersion(FORMAT_VERSION);
    testBusinessObjectDataKey.setPartitionValue(PARTITION_VALUE);
    testBusinessObjectDataKey.setSubPartitionValues(SUBPARTITION_VALUES);
    testBusinessObjectDataKey.setBusinessObjectDataVersion(DATA_VERSION);
    // Create the expected test output.
    String expectedOutput = String.format("namespace: \"%s\", businessObjectDefinitionName: \"%s\", businessObjectFormatUsage: \"%s\", " +
            "businessObjectFormatFileType: \"%s\", businessObjectFormatVersion: %d, businessObjectDataPartitionValue: \"%s\", " +
            "businessObjectDataSubPartitionValues: \"%s\", businessObjectDataVersion: %d", NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE,
        FORMAT_VERSION, PARTITION_VALUE, StringUtils.join(SUBPARTITION_VALUES, ","), DATA_VERSION);
    assertEquals(expectedOutput, businessObjectDataHelper.businessObjectDataKeyToString(testBusinessObjectDataKey));
    assertEquals(expectedOutput, businessObjectDataHelper
        .businessObjectDataKeyToString(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE, SUBPARTITION_VALUES,
            DATA_VERSION));
}