       workerId = Meteor.users.findOne(userId).workerId
       return Assignments.findOne({workerId, status: "assigned"})
 
+    setAssignmentPayment: (amount) ->
+      TurkServer.Assignment.currentAssignment().setPayment(amount);
+      return
+
     setAssignmentInstanceData: (arr) ->
       selector =
         workerId: Meteor.user().workerId


      unless Assignments.update(selector, $set: {instances: arr}) > 0
        throw new Meteor.Error(400, "Could not find assignment to update")
      return

if Meteor.isClient


      next()

  Tinytest.addAsync "experiment - client - instance ended state", (test, next) ->
    # In experiment. not ended
    test.isTrue TurkServer.inExperiment()
    test.isFalse TurkServer.instanceEnded()

    Meteor.call "endAssignmentInstance", false, (err, res) ->
      test.isTrue TurkServer.inExperiment()
      test.isTrue TurkServer.instanceEnded()

      next()

  ###
    Next test edits instance fields, so client APIs may break state
  ###

  Tinytest.addAsync "experiment - client - selects correct instance of multiple", (test, next) ->
    fields = [
      {
