public void testBreakpoints() {

    ParserContext ctx = new ParserContext();
    ctx.setSourceFile( "test.mv" );
    ctx.setDebugSymbols( true );

    ExpressionCompiler compiler = new ExpressionCompiler("a = 5;\nb = 5;\n\nif (a == b) {\n\nSystem.out.println('Good');\nreturn a + b;\n}\n", ctx);
    System.out.println("-------\n" + compiler.getExpression() + "\n-------\n");
    CompiledExpression compiled = compiler.compile();

    MVELRuntime.registerBreakpoint("test.mv", 7);

    final Set<Integer> breaked = new HashSet<Integer>();

    Debugger testDebugger = new Debugger() {
      public int onBreak(Frame frame) {
        System.out.println("Breakpoint [source:" + frame.getSourceName() + "; line:" + frame.getLineNumber() + "]");
        breaked.add(frame.getLineNumber());

        return 0;
      }
    };

    MVELRuntime.setThreadDebugger(testDebugger);

    assertEquals(10, MVEL.executeDebugger(compiled, null, new MapVariableResolverFactory(createTestMap())));
    assertTrue("did not break at line 7", breaked.contains(7));
  }