Assert.assertEquals(actionBean.getHasCalledProtectedAfterMethod(), 0); Assert.assertEquals(actionBean.getHasCalledProtectedBeforeMethod(), 0);
Assert.assertEquals(actionBean.getHasCalledProtectedAfterMethod(), 1); Assert.assertEquals(actionBean.getHasCalledProtectedBeforeMethod(), 1);
    public void testInterceptAtLifeCycleStage_EventHandling() throws Exception {        ExecutionContext context = new TestExecutionContext();        TestActionBean2 actionBean = new TestActionBean2();        context.setActionBean(actionBean);        context.setLifecycleStage(LifecycleStage.EventHandling);        BeforeAfterMethodInterceptor interceptor = new BeforeAfterMethodInterceptor();        Assert.assertNotNull(interceptor.intercept(context));        Assert.assertEquals(actionBean.getHasCalledAfterDefaultStage(), 1);        Assert.assertEquals(actionBean.getHasCalledAfterSpecificStage(), 0);        Assert.assertEquals(actionBean.getHasCalledAfterTwoStages(), 0);        Assert.assertEquals(actionBean.getHasCalledAfterWithReturn(), 1);        Assert.assertEquals(actionBean.getHasCalledAfterWithParameter(), 0);        Assert.assertEquals(actionBean.getHasCalledAfterWithReturnAndParameter(), 0);        Assert.assertEquals(actionBean.getHasCalledBeforeDefaultStage(), 1);        Assert.assertEquals(actionBean.getHasCalledBeforeSpecificStage(), 0);        Assert.assertEquals(actionBean.getHasCalledBeforeTwoStages(), 0);        Assert.assertEquals(actionBean.getHasCalledBeforeWithReturn(), 1);        Assert.assertEquals(actionBean.getHasCalledBeforeAfterSpecificStage(), 0);        Assert.assertEquals(actionBean.getHasCalledBeforeAfterDefaultStage(), 2);        Assert.assertEquals(actionBean.getHasCalledBeforeAfterWithParameter(), 0);        Assert.assertEquals(actionBean.getHasCalledBeforeWithParameter(), 0);        Assert.assertEquals(actionBean.getHasCalledBeforeWithReturnAndParameter(), 0);        Assert.assertEquals(actionBean.getHasCalledDummyMethod(), 0);        Assert.assertEquals(actionBean.getHasCalledProtectedAfterMethod(), 0);        Assert.assertEquals(actionBean.getHasCalledProtectedBeforeMethod(), 0);    }