@Test
public void test() {

  repl.interpret("case class Test(name:String, age:Int)", context);
  repl.interpret("val test = sc.parallelize(Seq(Test(\"moon\", 33), Test(\"jobs\", 51), Test(\"gates\", 51), Test(\"park\", 34)))", context);
  if (isDataFrameSupported()) {
    repl.interpret("test.toDF.registerTempTable(\"test\")", context);
  } else {
    repl.interpret("test.registerTempTable(\"test\")", context);
  }
  InterpreterResult ret = sql.interpret("select name, age from test where age < 40", context);
  assertEquals(InterpreterResult.Code.SUCCESS, ret.code());
  assertEquals(Type.TABLE, ret.type());
  assertEquals("name\tage\nmoon\t33\npark\t34\n", ret.message());
  ret = sql.interpret("select wrong syntax", context);
  assertEquals(InterpreterResult.Code.ERROR, ret.code());
  assertTrue(ret.message().length() > 0);
  assertEquals(InterpreterResult.Code.SUCCESS, sql.interpret("select case when name==\"aa\" then name else name end from test", context).code());
}