@Test
public void testGetBusinessObjectFormatExternalInterfaceEntityBusinessObjectFormatNoExists()
{

    // 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);
    // Mock the external calls.
    when(businessObjectFormatDao.getBusinessObjectFormatByAltKey(businessObjectFormatKey)).thenReturn(null);
    // Specify the expected exception.
    expectedException.expect(ObjectNotFoundException.class);
    expectedException.expectMessage(String.format("Business object format to external interface mapping with \"%s\" namespace, " +
        "\"%s\" business object definition name, \"%s\" business object format usage, \"%s\" business object format file type, and " +
        "\"%s\" external interface name doesn't exist.", NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, EXTERNAL_INTERFACE));
    // Call the method under test.
    businessObjectFormatExternalInterfaceDaoHelper.getBusinessObjectFormatExternalInterfaceEntity(businessObjectFormatExternalInterfaceKey);
    // Verify the external calls.
    verify(businessObjectFormatDao).getBusinessObjectFormatByAltKey(businessObjectFormatKey);
    verifyNoMoreInteractionsHelper();
}