@Test
public void testCompileOneClass() throws Exception {

  ClassLoader classLoader = this.getClass().getClassLoader();
  DiagnositicsLogger diagnosticsLogger = new DiagnositicsLogger();
  DynamicCompiler compiler = new DynamicCompiler(classLoader, diagnosticsLogger);
  String src = "package com.joliciel.talismane.utils.compiler.foo;\n" + "import com.joliciel.talismane.utils.compiler.DynamicCompilerTest.HelloInterface;\n"
      + "public class Foo implements HelloInterface {\n" + "        public String hello(String who) {\n" + "            return \"Hello \" + who;\n"
      + "        }\n" + "    }";
  String fullName = "com.joliciel.talismane.utils.compiler.foo.Foo";
  @SuppressWarnings("unchecked")
  Class<HelloInterface> helloClass = (Class<HelloInterface>) compiler.compile(fullName, src, null);
  HelloInterface foo = helloClass.newInstance();
  assertEquals("Hello world", foo.hello("world"));
}