Add test case for encoded ampersand in query