@Test
public void testGetBusinessObjectFormatExternalInterface()
{

    // 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 external interface.
    BusinessObjectFormatExternalInterface businessObjectFormatExternalInterface =
        new BusinessObjectFormatExternalInterface(ID, businessObjectFormatExternalInterfaceKey);
    // Mock the external calls.
    when(businessObjectFormatExternalInterfaceService.getBusinessObjectFormatExternalInterface(businessObjectFormatExternalInterfaceKey))
        .thenReturn(businessObjectFormatExternalInterface);
    // Call the method under test.
    BusinessObjectFormatExternalInterface result = businessObjectFormatExternalInterfaceRestController
        .getBusinessObjectFormatExternalInterface(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, EXTERNAL_INTERFACE);
    // Validate the result.
    assertEquals(businessObjectFormatExternalInterface, result);
    // Verify the external calls.
    verify(businessObjectFormatExternalInterfaceService).getBusinessObjectFormatExternalInterface(businessObjectFormatExternalInterfaceKey);
    verifyNoMoreInteractions(businessObjectFormatExternalInterfaceService);
}