     it 'should resolve with the result given a command which resolves with a result', ->
       commandResult = {}
       exampleContext = eventric.context 'Example'
-      exampleContext.addCommandHandler 'DoSomething', ->
+      exampleContext.addCommandHandlers DoSomething: ->
         new Promise (resolve) -> resolve commandResult
       exampleContext.initialize()
       .then ->

    it 'should execute the query repeatedly given a query which resolves but not with immediately with a result', ->
      exampleContext = eventric.context 'Example'
      callCount = 0
      exampleContext.addQueryHandler 'getSomething', ->
        new Promise (resolve, reject) ->
          callCount++
          if callCount < 5

      queryStub = sandbox.stub().returns new Promise (resolve) -> resolve {}
      queryParams = {}
      exampleContext = eventric.context 'Example'
      exampleContext.addQueryHandlers getSomething: queryStub
      exampleContext.initialize()
      .then ->
        commandQueryFactory.waitUntilQueryIsReady exampleContext, 'getSomething', queryParams
