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

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

          ]
          receive expects, done
          send 'graph', 'addnode',
            id: 'Repeat1'
            component: "#{collection}/Repeat"
      describe 'adding an in-port to a graph', ->
        it "should provide the graph's ports back", (done) ->
          expects = [
            protocol: 'runtime',
            command: 'ports',
            payload:
              graph: 'foo'
              inPorts:
                [
                  addressable: false
                  id: "in"
                  required: false
                  type: "any"
                ]
              outPorts: []
          ]
          receive expects, done
          send 'graph', 'addinport',
            public: 'in'
            node: 'RepeatRenamed'
            port: 'in'
            graph: 'foo'
      # describe 'adding an in-port 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', 'addinport',
      #       public: 'in'
      #       node: 'non-existent'
      #       port: 'in'
      #       graph: 'foo'
      describe 'adding an out-port to a graph', ->
        it "should provide the graph's ports back", (done) ->
          expects = [
            protocol: 'runtime',
            command: 'ports',
            payload:
              graph: 'foo'
              inPorts:
                [
                  addressable: false
                  id: "in"
                  required: false
                  type: "any"
                ]
              outPorts:
                [
                  addressable: false
                  id: "out"
                  required: false
                  type: "any"
                ]
          ]
          receive expects, done
          send 'graph', 'addoutport',
            public: 'out'
            node: 'RepeatRenamed'
            port: 'out'
            graph: 'foo'
      # describe 'renaming an in-port of a graph', ->
      #   it "should provide the graph's ports back", (done) ->
      #     expects = [
      #       protocol: 'runtime',
      #       command: 'ports',
      #       payload:
      #         graph: 'foo'
      #         inPorts:
      #           [
      #             addressable: false
      #             id: "input"
      #             required: false
      #             type: "any"
      #           ]
      #         outPorts:
      #           [
      #             addressable: false
      #             id: "out"
      #             required: false
      #             type: "any"
      #           ]
      #     ]
      #     receive expects, done
      #     send 'graph', 'renameinport',
      #       from: 'in'
      #       to: 'input'
      #       graph: 'foo'
      describe 'removing an out-port of a graph', ->
        it "should provide the graph's ports back", (done) ->
          expects = [
            protocol: 'runtime',
            command: 'ports',
            payload:
              graph: 'foo'
              inPorts:
                [
                  addressable: false
                  id: "in"
                  required: false
                  type: "any"
                ]
              outPorts: []
          ]
          receive expects, done
          send 'graph', 'removeoutport',
            public: 'out'
            graph: 'foo'
      # TODO:
      # ports:
      #   removeinport
      #   renameoutport
      # groups:
      #   addgroup / removegroup / renamegroup / changegroup

