@Test
public void testValidateBusinessObjectDefinitionKey()
{

    // Create a business object definition key.
    BusinessObjectDefinitionKey businessObjectDefinitionKey = new BusinessObjectDefinitionKey(BDEF_NAMESPACE, BDEF_NAME);
    // Mock the external calls.
    when(alternateKeyHelper.validateStringParameter("namespace", BDEF_NAMESPACE)).thenReturn(BDEF_NAMESPACE);
    when(alternateKeyHelper.validateStringParameter("business object definition name", BDEF_NAME)).thenReturn(BDEF_NAME);
    // Validate and trim a business object definition key.
    businessObjectDefinitionHelper.validateBusinessObjectDefinitionKey(businessObjectDefinitionKey);
    // Verify the external calls.
    verify(alternateKeyHelper).validateStringParameter("namespace", BDEF_NAMESPACE);
    verify(alternateKeyHelper).validateStringParameter("business object definition name", BDEF_NAME);
    verifyNoMoreInteractions(alternateKeyHelper, jsonHelper);
    // Validate the business object definition key.
    assertEquals(new BusinessObjectDefinitionKey(BDEF_NAMESPACE, BDEF_NAME), businessObjectDefinitionKey);
}