FooServiceImpl fooService = context.getBean("fooService", FooServiceImpl.class);
StaticListableBeanFactory myBf = (StaticListableBeanFactory) context.getBean("myBf");
MessageSource ms = (MessageSource) context.getBean("messageSource");
assertTrue(fooService.isInitCalled());
assertEquals("bar", fooService.foo(123));
assertSame(context.getDefaultListableBeanFactory(), fooService.beanFactory);
assertEquals(2, fooService.listableBeanFactory.size());
assertSame(context.getDefaultListableBeanFactory(), fooService.listableBeanFactory.get(0));
assertSame(myBf, fooService.listableBeanFactory.get(1));
assertSame(context, fooService.resourceLoader);