public void testMethodResolutionWithNullParameter() {
    Context ctx = new Context();
    ctx.setBean(new Bean());
    Map<String, Object> vars = new HashMap<String, Object>();
    System.out.println("bean.today: " + eval("bean.today",
        ctx,
        vars));
    System.out.println("formatDate(bean.today): " + eval("formatDate(bean.today)",
        ctx,
        vars));
    //calling method with string param with null parameter works
    System.out.println("formatString(bean.nullString): " + eval("formatString(bean.nullString)",
        ctx,
        vars));
    System.out.println("bean.myDate = bean.nullDate: " + eval("bean.myDate = bean.nullDate; return bean.nullDate;",
        ctx,
        vars));
    //calling method with Date param with null parameter fails
    System.out.println("formatDate(bean.myDate): " + eval("formatDate(bean.myDate)",
        ctx,
        vars));
    //same here
    System.out.println(eval("formatDate(bean.nullDate)",
        ctx,
        vars));
  }