Mock methodInterceptorMock = mock(MethodInterceptor.class);
pico.registerComponentInstance("interceptorComponentKey", methodInterceptorMock.proxy());
InterceptorFactory interceptorFactory = new ContainerSuppliedInterceptorFactory(pico, "interceptorComponentKey");
Interceptor interceptor = interceptorFactory.create(null);
assertNotNull(interceptor);
// verify that the dynaop interceptor delegates to the MethodInterceptor
// in the container:
methodInterceptorMock.expects(once()).method("invoke");
interceptor.intercept(null);
}