refactor logic to parse queue's URL when using query, add test case with relative path for queue URL