@BeforeClass public static void initialize() { SpringContextTest.initialize(); try { msgSender = (MsgSender) SpringContextTest.getBean("msgSender"); ds = (DataSource) SpringContextTest.getBean("datasource"); } catch (Exception e) { e.printStackTrace(); fail(); } }
@AfterClass public static void shutdown() { SpringContextTest.destroy(); }