KotlinInterpreter extends Interpreter { @Override public List<InterpreterCompletion> completion(String buf, int cursor, InterpreterContext interpreterContext) throws InterpreterException { return completer.completion(buf, cursor, interpreterContext); } KotlinInterpreter(Properties properties); KotlinReplProperties getKotlinReplProperties(); @Override void open(); @Override void close(); @Override InterpreterResult interpret(String code,
                                     InterpreterContext context); @Override void cancel(InterpreterContext context); @Override FormType getFormType(); @Override int getProgress(InterpreterContext context); @Override List<InterpreterCompletion> completion(String buf, int cursor,
      InterpreterContext interpreterContext); List<KotlinVariableInfo> getVariables(); List<KotlinFunctionInfo> getFunctions();  }
@Test public void testCompletion() throws Exception { interpreter.interpret("val x = 1", context); interpreter.interpret("fun inc(n: Int): Int = n + 1", context); List<InterpreterCompletion> completions = interpreter.completion("", 0, context); assertTrue(completions.stream().anyMatch(c -> c.name.equals("x"))); assertTrue(completions.stream().anyMatch(c -> c.name.equals("inc"))); }