           chai.expect(protocol).to.equal 'component'
           chai.expect(payload).to.include.keys ['name', 'code', 'language', 'library']
           chai.expect(payload.language).to.equal 'coffeescript'
-          chai.expect(payload.code).to.include "component: 'ProduceFoo'"
-          chai.expect(payload.code).to.include "module.exports = ProduceFoo"
+          chai.expect(payload.code).to.include "component: '#{componentName}'"
+          chai.expect(payload.code).to.include "module.exports = #{componentName}"
           receivedAck = true
           console.log 'got ACK'
         else if command == 'component'

  describe 'adding a component', ->
    componentName = 'SetSource'
    componentCode = fs.readFileSync(__dirname+'/fixtures/ProduceFoo.coffee', 'utf-8')

    it 'should become available', (done) ->
      receivedAck = false

        chai.expect(graph).to.include.keys ['connections', 'processes']
        chai.expect(graph.processes).to.include.keys ['mycoffeescriptproducer']
        chai.expect(graph.processes.mycoffeescriptproducer).to.eql
          component: componentName
          metadata:
            label: 'mycoffeeproducer'
            x: 2
