Added response mock
Made the query object optional, and removed a duplicate method
Updated test cases