Document API: References to document objects, citations, and an extended
RandomDocumentExample, plus JUnit tests.