@Test
public void testCloseMethod() throws Exception
{
LifecycleMethodReader c = new LifecycleMethodReader();
ActionWithLifecycleMethods actionBean = new ActionWithLifecycleMethods();
c.readAnnotations(actionBean.getClass());
final Method closeMethod = c.getCloseMethod();
SimpleControllerAction action = new SimpleControllerAction();
action.setCloseMethod(closeMethod);
action.doCloseMethod(actionBean);
// prove that the value has been injected
Assert.assertEquals(actionBean.getCloseCount(), 1);
}