add tests on document selection;