assertEquals(ControllerState.INSTALLED, lazyContext.getState());
controller.change(beanContext, ControllerState.DESCRIBED);
controller.change(lazyContext, ControllerState.INSTALLED);
IRare lazyRare = (IRare)lazyContext.getTarget();
assertNotNull(lazyRare);
try
{
lazyRare.getHits();
throw new RuntimeException("Should not be here.");
}
catch(Throwable t)
{
assertInstanceOf(t, IllegalArgumentException.class);
}
controller.install(new AbstractBeanMetaData("foobar", Object.class.getName()));
controller.change(beanContext, ControllerState.INSTALLED);
assertEquals(0, lazyRare.getHits());
lazyRare.setHits(10);
assertEquals(5, lazyRare.checkHits(15));
controller.uninstall(beanContext.getName());
assertEquals(ControllerState.DESCRIBED, lazyContext.getState());
}
finally