@Test
public void testUpdateExternalInterface()
{

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