StellarInterpreter extends Interpreter { @Override public List<InterpreterCompletion> completion(String buf, int cursor) { List<InterpreterCompletion> completes = new ArrayList<>(); for(String candidate : autoCompleter.autoComplete(buf)) { completes.add(new InterpreterCompletion(candidate, candidate)); } return completes; } StellarInterpreter(Properties properties); @Override void open(); @Override void close(); @Override InterpreterResult interpret(final String input, InterpreterContext context); @Override void cancel(InterpreterContext context); @Override FormType getFormType(); @Override int getProgress(InterpreterContext context); @Override List<InterpreterCompletion> completion(String buf, int cursor); StellarShellExecutor getExecutor();  }
@Test public void testAutoCompletionWithNoCompletions() { final String buffer = "NOTHING_AUTOCOMPLETES_THIS_"; int cursor = buffer.length(); List<InterpreterCompletion> completions = interpreter.completion(buffer, cursor); assertEquals(0, completions.size()); }