Added more tests for query and document update modes