 
         presenter = new TextEditorPresenter(model: editor, clientHeight: 130, clientWidth: 50, scrollTop: 0, baseCharacterWidth: 10, lineHeight: 10, lineOverdrawMargin: 0)
 
-        expect(presenter.state.content.lines[editor.tokenizedLineForScreenRow(3).id].decorationClasses).toBeNull()
-        expect(presenter.state.content.lines[editor.tokenizedLineForScreenRow(4).id].decorationClasses).toEqual ['a']
-        expect(presenter.state.content.lines[editor.tokenizedLineForScreenRow(5).id].decorationClasses).toEqual ['a', 'b']
-        expect(presenter.state.content.lines[editor.tokenizedLineForScreenRow(6).id].decorationClasses).toEqual ['a']
-        expect(presenter.state.content.lines[editor.tokenizedLineForScreenRow(7).id].decorationClasses).toBeNull()
+        expect(lineStateForScreenRow(presenter, 3).decorationClasses).toBeNull()
+        expect(lineStateForScreenRow(presenter, 4).decorationClasses).toEqual ['a']
+        expect(lineStateForScreenRow(presenter, 5).decorationClasses).toEqual ['a', 'b']
+        expect(lineStateForScreenRow(presenter, 6).decorationClasses).toEqual ['a']
+        expect(lineStateForScreenRow(presenter, 7).decorationClasses).toBeNull()
 
     describe "when ::scrollTop changes", ->
       it "updates the lines that are visible on screen", ->

        buffer.insert([2, 0], "hello\nworld\n")

        line1 = editor.tokenizedLineForScreenRow(1)
        expectValues presenter.state.content.lines[line1.id], {
          screenRow: 1
          text: line1.text
          tokens: line1.tokens

        }

        line2 = editor.tokenizedLineForScreenRow(2)
        expectValues lineStateForScreenRow(presenter, 2), {
          screenRow: 2
          text: line2.text
          tokens: line2.tokens
