@Override
  public InterpreterResult interpret(String code, InterpreterContext context) {

    // choosing new name to class containing Main method
    String generatedClassName = "C" + UUID.randomUUID().toString().replace("-", "");

    try {
      String res = StaticRepl.execute(generatedClassName, code);
      return new InterpreterResult(InterpreterResult.Code.SUCCESS, res);
    } catch (Exception e) {
      LOGGER.error("Exception in Interpreter while interpret", e);
      return new InterpreterResult(InterpreterResult.Code.ERROR, e.getMessage());

    }

  }
@Test
  void testStaticReplWithoutMain() {

    StringBuffer sourceCode = new StringBuffer();
    sourceCode.append("package org.mdkt;\n");
    sourceCode.append("public class HelloClass {\n");
    sourceCode.append("   public String hello() { return \"hello\"; }");
    sourceCode.append("}");
    InterpreterResult res = java.interpret(sourceCode.toString(), context);
    assertEquals(InterpreterResult.Code.ERROR, res.code());
  }