Added test for buildQueryString