     it 'should reject with an error given a query which rejects with an error', ->
       error = new Error
       exampleContext = eventric.context 'Example'
-      exampleContext.addQueryHandler 'getSomething', ->
+      exampleContext.addQueryHandlers getSomething: ->
         new Promise (resolve, reject) -> reject error
       exampleContext.initialize()
       .then ->


    it 'should reject with a descriptive error given a command which does not yield a result within the timeout', ->
      exampleContext = eventric.context 'Example'
      exampleContext.addCommandHandler 'DoSomething', ->
        new Promise (resolve) ->
          setTimeout ->
            resolve()

      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
