       it 'should execute the query directly on the correct read aggregate repository', ->
         BoundedContext = eventric 'BoundedContext'
         class FooReadAggregateRepository
-          findByExample: sandbox.stub()
+          findById: sandbox.stub()
         class ExampleBoundedContext extends BoundedContext
           readAggregateRepositories:
             'Aggregate': FooReadAggregateRepository

        BoundedContext = eventric 'BoundedContext'
        exampleApplicationService =
          queries:
            'Aggregate:findByExample': 'aggregateFindByExample'
          aggregateFindByExample: sandbox.stub()

        class ExampleBoundedContext extends BoundedContext
          applicationServices: [
            exampleApplicationService
          ]

        query =
          name: 'Aggregate:findByExample'
          params:
            foo: 'bar'
        exampleBoundedContext = new ExampleBoundedContext
        exampleBoundedContext.initialize()
        exampleBoundedContext.query query

        expect(exampleApplicationService.aggregateFindByExample.calledWith query.params).to.be.ok()


  describe 'onDomainEvent', ->

        exampleBoundedContext.initialize()

        query =
          name: 'Aggregate:findById'
          id: 42

        exampleBoundedContext.query query

        expect(FooReadAggregateRepository::findById.calledWith query.id).to.be.ok()


    describe 'has a registered handler', ->
