BeanFactory bf = bfCtrl.createMock(BeanFactory.class);
BeanFactory bf = bfCtrl.createMock(ListableBeanFactory.class);
    public void testActivateDialPlan() throws Exception {        IMocksControl bfCtrl = EasyMock.createControl();        BeanFactory bf = bfCtrl.createMock(BeanFactory.class);        bf.getBean(ConfigGenerator.BEAN_NAME, ConfigGenerator.class);        bfCtrl.andReturn(createConfigGenerator());        bfCtrl.andReturn(createConfigGenerator());        bfCtrl.andReturn(createConfigGenerator());        bfCtrl.replay();        DialPlanContextImpl manager = new MockDialPlanContextImpl(new DialPlan());        manager.setBeanFactory(bf);        final ConfigGenerator g1 = manager.getGenerator();        final ConfigGenerator g2 = manager.generateDialPlan();        final ConfigGenerator g3 = manager.getGenerator();        assertNotNull(g1);        assertNotNull(g2);        assertNotSame(g1, g2);        assertNotSame(g2, g3);        bfCtrl.verify();    }