Test document selection.