}
public void testFineGrainedActions() throws Throwable
{
KernelControllerContext context = getControllerContext(FineGrainedActionTestCase.BEAN_NAME, ControllerState.NOT_INSTALLED);
FineGrainedBean target;
change(context, ControllerState.DESCRIBED);
target = (FineGrainedBean) context.getTarget();
assertNull(target);
change(context, ControllerState.INSTANTIATED);
target = (FineGrainedBean) context.getTarget();
assertNotNull(target);
assertEquals("INSTANTIATED", target.getStateString());
change(context, ControllerState.CONFIGURED);
target = (FineGrainedBean) context.getTarget();
assertNotNull(target);
assertEquals("CONFIGURED", target.getStateString());
change(context, ControllerState.CREATE);
target = (FineGrainedBean) context.getTarget();
assertNotNull(target);
assertEquals("CREATE", target.getStateString());
change(context, ControllerState.START);
target = (FineGrainedBean) context.getTarget();
assertNotNull(target);
assertEquals("START", target.getStateString());
change(context, ControllerState.INSTALLED);
target = (FineGrainedBean) context.getTarget();
assertNotNull(target);
assertEquals("INSTALLED", target.getStateString());
change(context, ControllerState.START);
target = (FineGrainedBean) context.getTarget();
assertNotNull(target);
assertEquals("START", target.getStateString());
change(context, ControllerState.CREATE);
target = (FineGrainedBean) context.getTarget();
assertNotNull(target);
assertEquals("CREATE", target.getStateString());
change(context, ControllerState.CONFIGURED);
target = (FineGrainedBean) context.getTarget();
assertNotNull(target);
assertEquals("CONFIGURED", target.getStateString());
change(context, ControllerState.INSTANTIATED);
target = (FineGrainedBean) context.getTarget();
assertNotNull(target);
assertEquals("INSTANTIATED", target.getStateString());
change(context, ControllerState.DESCRIBED);
target = (FineGrainedBean) context.getTarget();
assertNull(target);