         done()
 
     it 'should return a instantiated ReadAggregate containing the applied DomainEvents', (done) ->
-      readAggregate = readAggregateRepository.findById 'ReadFoo', 23, (err, readAggregate) ->
+      readAggregateRepository.findById 'ReadFoo', 23, (err, readAggregate) ->
         expect(readAggregate.name).to.be 'John'
         done()
 

    EventStoreStub.find.yields null, [
      name: 'create'
      aggregate:
        changed:
          props:
            name: 'John'

        expect(readAggregates[0]).to.be.a ReadFoo
        done()

  describe '#findOne', ->

    it 'should call find and return only one result', (done) ->
      findStub = sandbox.stub readAggregateRepository, 'find'
      findStub.yields null, [1, 2]
      readAggregateRepository.findOne 'ReadFoo', {}, (err, result) ->
        expect(result).to.be 1
        done()


  describe '#findIds', ->

    it 'should return all AggregateIds matching the given query', (done) ->
      readAggregateRepository.findIds 'ReadFoo', {}, (err, aggregateIds) ->
        expect(aggregateIds.length).to.be 1
        expect(aggregateIds[0]).to.be 23
        done()
