@Test
public void testDeleteExternalInterface()
{

    ExternalInterfaceKey externalInterfaceKey = new ExternalInterfaceKey(EXTERNAL_INTERFACE);
    // Create an external interface.
    ExternalInterface externalInterface = new ExternalInterface(externalInterfaceKey, DISPLAY_NAME_FIELD, DESCRIPTION);
    when(externalInterfaceService.deleteExternalInterface(new ExternalInterfaceKey(EXTERNAL_INTERFACE))).thenReturn(externalInterface);
    ExternalInterface deletedExternalInterface = externalInterfaceRestController.deleteExternalInterface(EXTERNAL_INTERFACE);
    // Verify the external calls.
    verify(externalInterfaceService).deleteExternalInterface(new ExternalInterfaceKey(EXTERNAL_INTERFACE));
    verifyNoMoreInteractions(externalInterfaceService);
    // Validate the returned object.
    assertEquals(externalInterface, deletedExternalInterface);
}