Add some tests for Document