Added support for specifying query string
Added test with query specified as a hash