expect(beanFactory.getBeanDefinitionNames()).andReturn(new String[]{"bean1","bean2"});
expect(beanFactory.getBeanDefinition("bean1")).andReturn(beanDefinition1);
expect(beanDefinition1.isAbstract()).andReturn(false);
expect(beanFactory.getBean("bean1")).andReturn(bean1);
callback.doWithBean("bean1", bean1);
expect(beanFactory.getBeanDefinition("bean2")).andReturn(beanDefinition2);
expect(beanDefinition2.isAbstract()).andReturn(true);
replay(beanDefinition1);