@Test
public void testGetBusinessObjectFormatExternalInterfaceDescriptiveInformation()
{

    // Create a business object format external interface key.
    BusinessObjectFormatExternalInterfaceKey businessObjectFormatExternalInterfaceKey =
        new BusinessObjectFormatExternalInterfaceKey(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, EXTERNAL_INTERFACE);
    // Create a business object format key
    BusinessObjectFormatKey businessObjectFormatKey = new BusinessObjectFormatKey(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, null);
    // Create an external interface entity.
    ExternalInterfaceEntity externalInterfaceEntity = new ExternalInterfaceEntity();
    // Create a business object format entity.
    BusinessObjectFormatEntity businessObjectFormatEntity = new BusinessObjectFormatEntity();
    // Create a business object external interface descriptive information object
    BusinessObjectFormatExternalInterfaceDescriptiveInformation businessObjectFormatExternalInterfaceDescriptiveInformation =
        new BusinessObjectFormatExternalInterfaceDescriptiveInformation(businessObjectFormatExternalInterfaceKey, DISPLAY_NAME_FIELD, DESCRIPTION);
    // Mock the external calls.
    when(externalInterfaceDaoHelper.getExternalInterfaceEntity(EXTERNAL_INTERFACE)).thenReturn(externalInterfaceEntity);
    when(businessObjectFormatDaoHelper.getBusinessObjectFormatEntity(businessObjectFormatKey)).thenReturn(businessObjectFormatEntity);
    when(businessObjectFormatExternalInterfaceDescriptiveInformationHelper
        .createBusinessObjectFormatExternalInterfaceDescriptiveInformationFromEntities(businessObjectFormatEntity, externalInterfaceEntity))
        .thenReturn(businessObjectFormatExternalInterfaceDescriptiveInformation);
    // Call the method under test.
    BusinessObjectFormatExternalInterfaceDescriptiveInformation result = businessObjectFormatExternalInterfaceDescriptiveInformationService
        .getBusinessObjectFormatExternalInterfaceDescriptiveInformation(businessObjectFormatExternalInterfaceKey);
    // Validate the results.
    assertEquals(businessObjectFormatExternalInterfaceDescriptiveInformation, result);
    // Verify the external calls.
    verify(businessObjectFormatExternalInterfaceHelper).validateAndTrimBusinessObjectFormatExternalInterfaceKey(businessObjectFormatExternalInterfaceKey);
    verify(businessObjectFormatExternalInterfaceDaoHelper).getBusinessObjectFormatExternalInterfaceEntity(businessObjectFormatExternalInterfaceKey);
    verify(externalInterfaceDaoHelper).getExternalInterfaceEntity(EXTERNAL_INTERFACE);
    verify(businessObjectFormatDaoHelper).getBusinessObjectFormatEntity(businessObjectFormatKey);
    verify(businessObjectFormatExternalInterfaceDescriptiveInformationHelper)
        .createBusinessObjectFormatExternalInterfaceDescriptiveInformationFromEntities(businessObjectFormatEntity, externalInterfaceEntity);
    verifyNoMoreInteractionsHelper();
}