 
     it('will load new documents if the buffer is empty', ->
       expect(@manager.documentStore.length).toBe 1
-      documentPayload = @manager.next()
+      @manager.next()
       @manager.currentDocument = undefined
       expect(@manager.documentStore.length).toBe 0
 

  describe 'requestNextDocumentPayload', ->
    it('is equal as the manager\'s currentDocument payload', ->
      expect(@manager.documentStore.length).toBe 1
      documentPayload = @manager.next()
      expect(@manager.currentDocument.payload).toBe documentPayload
    )


  )

  it('returns an annotation document equal to the FactoryGirl definition', ->
    nextDocumentDefinition = @manager.next()
    expect(nextDocumentDefinition).toBeDefined()

    interfaceType = Object.keys(nextDocumentDefinition)[0]
    expect(interfaceType).toBeDefined()
    expect(interfaceType).toBe 'text_nominal'

    documentPayload = nextDocumentDefinition[interfaceType]
    expect(documentPayload).toBeDefined()
    expect(documentPayload).not.toBe false
    expect(documentPayload.label).toBe 'testlabel'
