Component dao = Components.static_method(InjectingDecorator.class,
"getInjectingDecorator", new Class[]{Object.class, Class.class, Injector.class})
.withArguments(new Component[]{dumb_dao, Components.value(MyBean.class), injector});
yan.registerComponent("dao", dao);
MyBeanDao mdao = (MyBeanDao)yan.getInstance("dao");
assertEquals(mdao, mdao);
Named mbean = mdao.getBeanById(1);
assertEquals("apple", mbean.getName());
}