ContextRefreshedEvent event = new ContextRefreshedEvent(appContext);
    public void testPublishSave() {        Object entity = new Object();        MockControl listenerCtrl = MockControl.createControl(DaoEventListener.class);        DaoEventListener listener = (DaoEventListener) listenerCtrl.getMock();        listener.onSave(entity);        listener.onSave(entity);        listenerCtrl.replay();        Map beans = new HashMap();        beans.put("1", listener);        beans.put("2", listener);        MockControl appContextCtrl = MockControl.createControl(ApplicationContext.class);        ApplicationContext appContext = (ApplicationContext) appContextCtrl.getMock();        appContext.getBeansOfType(DaoEventListener.class, true, true);        appContextCtrl.setReturnValue(beans);        appContextCtrl.replay();        ContextRefreshedEvent event = new ContextRefreshedEvent(appContext);        DaoEventPublisherImpl impl = new DaoEventPublisherImpl();        impl.onApplicationEvent(event);        impl.publishSave(entity);        appContextCtrl.verify();        listenerCtrl.verify();    }