Added API (unit test fails) for performing a query operation