@Test
public void testGetBusinessObjectFormatExternalInterfaceEntity()
{

    // Create a business object format to external interface mapping key.
    BusinessObjectFormatExternalInterfaceKey businessObjectFormatExternalInterfaceKey =
        new BusinessObjectFormatExternalInterfaceKey(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, EXTERNAL_INTERFACE);
    // Create a version-less business object format key.
    BusinessObjectFormatKey businessObjectFormatKey = new BusinessObjectFormatKey(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, null);
    // Create a business object format entity.
    BusinessObjectFormatEntity businessObjectFormatEntity = new BusinessObjectFormatEntity();
    // Create a external interface entity.
    ExternalInterfaceEntity externalInterfaceEntity = new ExternalInterfaceEntity();
    // Create a business object format to external interface mapping entity.
    BusinessObjectFormatExternalInterfaceEntity businessObjectFormatExternalInterfaceEntity = new BusinessObjectFormatExternalInterfaceEntity();
    // Mock the external calls.
    when(businessObjectFormatDao.getBusinessObjectFormatByAltKey(businessObjectFormatKey)).thenReturn(businessObjectFormatEntity);
    when(externalInterfaceDao.getExternalInterfaceByName(EXTERNAL_INTERFACE)).thenReturn(externalInterfaceEntity);
    when(businessObjectFormatExternalInterfaceDao
        .getBusinessObjectFormatExternalInterfaceByBusinessObjectFormatAndExternalInterface(businessObjectFormatEntity, externalInterfaceEntity))
        .thenReturn(businessObjectFormatExternalInterfaceEntity);
    // Call the method under test.
    BusinessObjectFormatExternalInterfaceEntity result =
        businessObjectFormatExternalInterfaceDaoHelper.getBusinessObjectFormatExternalInterfaceEntity(businessObjectFormatExternalInterfaceKey);
    // Validate the results.
    assertEquals(businessObjectFormatExternalInterfaceEntity, result);
    // Verify the external calls.
    verify(businessObjectFormatDao).getBusinessObjectFormatByAltKey(businessObjectFormatKey);
    verify(externalInterfaceDao).getExternalInterfaceByName(EXTERNAL_INTERFACE);
    verify(businessObjectFormatExternalInterfaceDao)
        .getBusinessObjectFormatExternalInterfaceByBusinessObjectFormatAndExternalInterface(businessObjectFormatEntity, externalInterfaceEntity);
    verifyNoMoreInteractionsHelper();
}