sc.setInitParameter(YanLoader.CONFIG_FILE_PARAM, "/WEB-INF/yancontainer.xml");
sc.setInitParameter(YanLoader.USE_SPRING, "true");
verifyListener(sc, "ba");
}
private void verifyListener(ServletContext sc, String beanname){
ServletContextListener listener = new YanLoaderListener();
ServletContextEvent event = new ServletContextEvent(sc);
listener.contextInitialized(event);
final BankAccount acct = verifyBean(sc, beanname);
listener.contextDestroyed(event);
assertTrue(acct.isDestroyed());
}