                 route: 5
               graph: 'foo'
           ]
-          connection.once 'message', (message) ->
-            data = JSON.parse message.utf8Data
-
-            validateSchema data, '/graph/output/addedge'
-            chai.expect(data.payload.src).to.eql expects[0].payload.src
-            chai.expect(data.payload.tgt).to.eql expects[0].payload.tgt
-
-            done()
-
+          receive expects, done
           send 'graph', 'addedge', expects[0].payload
       # describe 'adding an edge to a non-existent node', ->
       #   it 'should return an error', (done) ->

            command: 'error',
            payload:
              message: 'Requested graph not found'
              stack: String
          ]
          connection.once 'message', (message) ->
            data = JSON.parse message.utf8Data
            validateSchema data, '/graph/output/error'

            done()

          send 'graph', 'addnode',
            id: 'Repeat1'
            component: "#{collection}/Repeat"

              to: 'RepeatRenamed'
              graph: 'foo'
          ]
          receive expects, done
          send 'graph', 'renamenode', expects[0].payload

      describe 'adding a node to a non-existent graph', ->
