implement test for getCursorOffset()
rename document into delegateDocument
add test for getLineOfOffset()
add test for getLineOffset()