public void test2() throws Exception
{
log.info("======= Basic.test2()");
assertEquals(0, BasicInterceptor.postConstructs);
BasicBean bean = new BasicBean();
System.out.println("instanceAdvisor = " + ((InstanceAdvised) bean)._getInstanceAdvisor());
assertEquals("BasicInterceptor postConstruct must have been called once", 1, BasicInterceptor.postConstructs);
System.out.println(bean.getClass() + " " + bean.getClass().getClassLoader());
System.out.println(" " + Arrays.toString(bean.getClass().getInterfaces()));
String result = bean.sayHi("Test");
System.out.println(result);
assertEquals("sayHi didn't invoke BasicInterceptor.aroundInvoke once", 1, BasicInterceptor.aroundInvokes);
assertEquals("sayHi didn't invoke BasicBean.aroundInvoke once", 1, BasicBean.aroundInvokes);
bean.intercept();
assertEquals("intercept didn't invoke BasicMethodInterceptor.aroundInvoke", 1, BasicMethodInterceptor.aroundInvokes);
bean.intercept();
assertEquals("intercept didn't invoke BasicMethodInterceptor.aroundInvoke", 2, BasicMethodInterceptor.aroundInvokes);
assertEquals("intercept didn't invoke BasicInterceptor.aroundInvoke", 3, BasicInterceptor.aroundInvokes);
assertEquals("BasicInterceptor postConstruct must have been called once", 1, BasicInterceptor.postConstructs);
// 12.7 footnote 57