added test case for encoding option to Query