     return callback new Error data.toString()
   return child
 
-startForeign = (name, callback) ->
-  args = foreignParticipants[name]
+startForeign = (commands, name, callback) ->
+  args = commands[name]
   return startProcess args, callback
 
-testParticipant = (state, name) ->
+exports.testParticipant = testParticipant = (state, name) ->
 
   describe "#{name} participant", ->
     participant = null
     beforeEach (done) ->
       @timeout 4000
-      participant = startForeign name, done
+      participant = startForeign state.commands, name, done
     afterEach (done) ->
       participant.kill()
       done()

              setTimeout send, 1000 # HACK: wait for inqueue to be setup



describe 'Heterogenous', ->
  address = 'amqp://localhost'
  g =
    broker: null

  beforeEach (done) ->
    g.broker = msgflo.transport.getBroker address


python = process.env.PYTHON or 'python'
foreignParticipants =
#  'PythonRepeat': [python, path.join __dirname, 'fixtures', './repeat.py']
#  'CppRepeat': [python, path.join __dirname, 'fixtures', './repeat-cpp']

startProcess = (args, callback) ->
