Add tests for autocomplete