public void testFactoryReferences() {
    DummyFactory factory = (DummyFactory) getBeanFactory().getBean("&singletonFactory");

    DummyReferencer ref = (DummyReferencer) getBeanFactory().getBean("factoryReferencer");
    assertTrue(ref.getTestBean1() == ref.getTestBean2());
    assertTrue(ref.getDummyFactory() == factory);

    DummyReferencer ref2 =
        (DummyReferencer) getBeanFactory().getBean("factoryReferencerWithConstructor");
    assertTrue(ref2.getTestBean1() == ref2.getTestBean2());
    assertTrue(ref2.getDummyFactory() == factory);
  }
 public void testPrototypeReferences() {
   // check that not broken by circular reference resolution mechanism
   DummyReferencer ref1 = (DummyReferencer) getBeanFactory().getBean("prototypeReferencer");
   assertTrue("Not referencing same bean twice", ref1.getTestBean1() != ref1.getTestBean2());
   DummyReferencer ref2 = (DummyReferencer) getBeanFactory().getBean("prototypeReferencer");
   assertTrue("Not the same referencer", ref1 != ref2);
   assertTrue("Not referencing same bean twice", ref2.getTestBean1() != ref2.getTestBean2());
   assertTrue("Not referencing same bean twice", ref1.getTestBean1() != ref2.getTestBean1());
   assertTrue("Not referencing same bean twice", ref1.getTestBean2() != ref2.getTestBean2());
   assertTrue("Not referencing same bean twice", ref1.getTestBean1() != ref2.getTestBean2());
 }
 public void testFactoryReferences() {
   DummyReferencer ref = (DummyReferencer) getBeanFactory().getBean("factoryReferencer");
   assertTrue(ref.getTestBean1() == ref.getTestBean2());
 }