tapc.testInterceptor.nrOfInvocations = 0;
FactoryBean<?> factory = (FactoryBean<?>) sac.getBean("&singletonFactoryToBeProxied");
assertFalse(AopUtils.isAopProxy(factory));
TestBean tb = (TestBean) sac.getBean("singletonFactoryToBeProxied");
assertTrue(AopUtils.isCglibProxy(tb));
assertEquals(0, tapc.testInterceptor.nrOfInvocations);
tb.getAge();
assertEquals(1, tapc.testInterceptor.nrOfInvocations);
TestBean tb2 = (TestBean) sac.getBean("singletonFactoryToBeProxied");
assertSame(tb, tb2);
assertEquals(1, tapc.testInterceptor.nrOfInvocations);
tb2.getAge();
assertEquals(2, tapc.testInterceptor.nrOfInvocations);
}