public void testDuplicateVariableDeclaration() {
    ParserContext context = new ParserContext();
    ExpressionCompiler compiler = new ExpressionCompiler("String x = \"abc\"; Integer x = new Integer( 10 );", context);

    try {
      compiler.compile();
      fail("Compilation must fail with duplicate variable declaration exception.");
    }
    catch (RuntimeException ce) {
      // success
    }
  }