Add tests for the document observer.