Components.fun(Functions.instance_method(type, "getGreeting"));
fail("should have failed with IllegalArgumentException");
}
catch(IllegalArgumentException e){}
yan.registerComponent(Components.static_method(type, "instance"));
yan.registerValue("Tom");
yan.registerComponent("target",
Components.fun(Functions.instance_method(type, "greet"))
.withArgument(1, Components.value("Jerry")));
assertEquals("hello Jerry, I am Tom", ""+yan.getInstance("target"));
yan.registerComponent(Components.static_method(type, "instance"));