Add simple unit tests for QueryResource