Tests for JSON response in handleAutocomplete.