           ]
           receive expects, done
           send 'graph', 'addedge', expects[0].payload
+      # describe 'adding an edge to a non-existent node', ->
+      #   it 'should return an error', (done) ->
+      #     expects = [
+      #       protocol: 'graph'
+      #       command: 'error'
+      #       payload:
+      #         msg: 'Requested port not found'
+      #     ]
+      #     receive expects, done
+      #     send 'graph', 'addedge',
+      #       protocol: 'graph'
+      #       command: 'addedge'
+      #       payload:
+      #         src:
+      #           node: 'non-existent'
+      #           port: 'out'
+      #         tgt:
+      #           node: 'Drop1'
+      #           port: 'in'
+      #         graph: 'foo'
+      # describe 'adding an edge to a non-existent port', ->
+      #   it 'should return an error', (done) ->
+      #     expects = [
+      #       protocol: 'graph'
+      #       command: 'error'
+      #       payload:
+      #         msg: 'Requested port not found'
+      #     ]
+      #     receive expects, done
+      #     send 'graph', 'addedge',
+      #       protocol: 'graph'
+      #       command: 'addedge'
+      #       payload:
+      #         src:
+      #           node: 'Repeat1'
+      #           port: 'non-existent'
+      #         tgt:
+      #           node: 'Drop1'
+      #           port: 'in'
+      #         graph: 'foo'
       describe 'adding metadata', ->
         describe 'to a node with no metadata', ->
           it 'should add the metadata', (done) ->

            protocol: 'graph'
            command: 'changenode'
            payload:
              id: 'Bar'
              metadata: {}
              graph: 'foo'
          ,
            protocol: 'graph'
            command: 'removenode'
            payload:
              id: 'Bar'
              component: "#{collection}/Drop"
              metadata: {}
              graph: 'foo'
          ]
          receive expects, done
          send 'graph', 'removenode',
            id: 'Bar'
            graph: 'foo'
      describe 'removing an IIP', ->
        it 'should provide the IIP back', (done) ->

              src:
                data: 'Hello, world!'
              tgt:
                node: 'Repeat1'
                port: 'in'
              metadata: {}
              graph: 'foo'
