@Test
public void testCreateExternalInterface()
{

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