DefaultStellarAutoCompleter implements StellarAutoCompleter { private Iterable<String> autoCompleteMagic(String buffer) { return autoComplete(buffer, OperationType.MAGIC); } DefaultStellarAutoCompleter(); @Override Iterable<String> autoComplete(String buffer); @Override void addCandidateFunction(String name); @Override void addCandidateVariable(String name);  }
@Test public void testAutoCompleteMagic() { completer.addCandidateFunction("%vars"); completer.addCandidateFunction("%vast"); completer.addCandidateFunction("%verbotten"); Iterable<String> result = completer.autoComplete("%va"); List<String> completes = Lists.newArrayList(result); assertEquals(2, completes.size()); assertThat(completes, hasItem("%vars")); assertThat(completes, hasItem("%vast")); }