* https://issues.apache.org/jira/browse/WICKET-4149
*/
@Test
public void beanInjectedInBehavior()
{
ctx.putBean("mrBean", new Bean());
// with no name specified we get IllegalStateException
Page page = tester.startPage(new AnnotatedFieldInBehaviorPage());
TestBehavior behavior = page.getBehaviors(TestBehavior.class).get(0);
assertNotNull(behavior.getBean());