@Test
public void testDeleteBusinessObjectFormatExternalInterface()
{

    // 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 business object format to external interface mapping.
    BusinessObjectFormatExternalInterface businessObjectFormatExternalInterface =
        new BusinessObjectFormatExternalInterface(ID, businessObjectFormatExternalInterfaceKey);
    // Create a business object format to external interface mapping entity.
    BusinessObjectFormatExternalInterfaceEntity businessObjectFormatExternalInterfaceEntity = new BusinessObjectFormatExternalInterfaceEntity();
    // Mock the external calls.
    when(businessObjectFormatExternalInterfaceDaoHelper.getBusinessObjectFormatExternalInterfaceEntity(businessObjectFormatExternalInterfaceKey))
        .thenReturn(businessObjectFormatExternalInterfaceEntity);
    when(businessObjectFormatExternalInterfaceHelper.createBusinessObjectFormatExternalInterfaceFromEntity(businessObjectFormatExternalInterfaceEntity))
        .thenReturn(businessObjectFormatExternalInterface);
    // Call the method under test.
    BusinessObjectFormatExternalInterface result =
        businessObjectFormatExternalInterfaceService.deleteBusinessObjectFormatExternalInterface(businessObjectFormatExternalInterfaceKey);
    // Validate the results.
    assertEquals(businessObjectFormatExternalInterface, result);
    // Verify the external calls.
    verify(businessObjectFormatExternalInterfaceHelper).validateAndTrimBusinessObjectFormatExternalInterfaceKey(businessObjectFormatExternalInterfaceKey);
    verify(businessObjectFormatExternalInterfaceDaoHelper).getBusinessObjectFormatExternalInterfaceEntity(businessObjectFormatExternalInterfaceKey);
    verify(businessObjectFormatExternalInterfaceDao).delete(businessObjectFormatExternalInterfaceEntity);
    verify(businessObjectFormatExternalInterfaceHelper).createBusinessObjectFormatExternalInterfaceFromEntity(businessObjectFormatExternalInterfaceEntity);
    verifyNoMoreInteractionsHelper();
}