interceptors[1] = secondInterceptor;
DummyBeanContext<Object> dummyBeanContext = new DummyBeanContext<Object>();
dummyBeanContext.setBeanInstance(new Object());
// Create an invocation with the beancontext and the interceptors
LifecycleMethodInterceptorsInvocation invocation = new LifecycleMethodInterceptorsInvocation(dummyBeanContext,
interceptors);
// invoke
Object result = invocation.invokeNext();
// now check the number of interceptors invoked and their order
assertNull(LifecycleMethodInterceptorsInvocation.class.getName() + " invocation returned a non-null result",
result);
List<Interceptor> invokedInterceptors = InterceptorInvocationOrderTracker.getInstance().getInvokedInterceptors();