Reimplement autocomplete tests with java