@Test
public void testGetAllBusinessObjectDataByBusinessObjectDefinition()
{

    // Create a business object definition key.
    BusinessObjectDefinitionKey businessObjectDefinitionKey = new BusinessObjectDefinitionKey(BDEF_NAMESPACE, BDEF_NAME);
    // Create a list of business object data keys.
    BusinessObjectDataKeys businessObjectDataKeys = new BusinessObjectDataKeys(Arrays.asList(new BusinessObjectDataKey()));
    // Mock the external calls.
    when(businessObjectDataService.getAllBusinessObjectDataByBusinessObjectDefinition(businessObjectDefinitionKey)).thenReturn(businessObjectDataKeys);
    // Call the method under test.
    BusinessObjectDataKeys result = businessObjectDataRestController.getAllBusinessObjectDataByBusinessObjectDefinition(BDEF_NAMESPACE, BDEF_NAME);
    // Verify the external calls.
    verify(businessObjectDataService).getAllBusinessObjectDataByBusinessObjectDefinition(businessObjectDefinitionKey);
    verifyNoMoreInteractionsHelper();
    // Validate the results.
    assertEquals(businessObjectDataKeys, result);
}