       expect(parsed).to.eql(dog: "woof", cat: "meow")
 
   describe "#highlightFromAnnotation()", ->
+    beforeEach ->
+      sinon.stub(utils, 'postText').returns('post')
+      sinon.stub(utils, 'preText').returns('pre')
+
+    afterEach ->
+      utils.postText.restore()
+      utils.preText.restore()
+
     it "should parse the annotation and return a highlight", ->
       target = utils.highlightFromAnnotation(annotation)
-      expect(target).to.have.property("locators").to.have.property("annotator", '{"ranges":[],"page":"http://page"}')
+      expect(target).to.have.property("locators").to.have.property("pre", "pre")
+      expect(target).to.have.property("locators").to.have.property("post", "post")
+      expect(target).to.have.property("locators").to.have.property("xpath")
+      expect(target).to.have.property("locators").to.have.property("file_id", "http://page")
       expect(target).to.have.property("content", annotation.quote)
       expect(target).to.have.property("id", annotation.id)
 

      highlight.pre = "[]"
      target = utils.annotationFromHighlight(highlight, client)
      target.done (annotation) ->
        expect(annotation.ranges).to.eql([])

    annotation =
      id: 1
      page: "http://page"
      ranges: [{start: "/p", end: "/p", startOffset: 0, endOffset: 1}]
      highlights: [],
      text: "This is an annotation comment"
      quote: "some highlighted text"

