@Test
public void testGetBusinessObjectDefinitionsByNamespace()
{

    // Create business object definition keys.
    BusinessObjectDefinitionKeys businessObjectDefinitionKeys =
        new BusinessObjectDefinitionKeys(Arrays.asList(new BusinessObjectDefinitionKey(BDEF_NAMESPACE, BDEF_NAME)));
    // Mock the external calls.
    when(businessObjectDefinitionService.getBusinessObjectDefinitions(BDEF_NAMESPACE)).thenReturn(businessObjectDefinitionKeys);
    // Call the method under test.
    BusinessObjectDefinitionKeys resultKeys = businessObjectDefinitionRestController.getBusinessObjectDefinitions(BDEF_NAMESPACE);
    // Verify the external calls.
    verify(businessObjectDefinitionService).getBusinessObjectDefinitions(BDEF_NAMESPACE);
    verifyNoMoreInteractions(businessObjectDefinitionService);
    // Validate the results.
    assertEquals(businessObjectDefinitionKeys, resultKeys);
}