ApplicationContextResolverImpl implements ApplicationContextResolver, InitializingBean,
                   DisposableBean { @Override public void closeApplicationContext(ApplicationContext applicationContext) { if (applicationContext instanceof AbstractApplicationContext) { AbstractApplicationContext aac = AbstractApplicationContext.class .cast(applicationContext); aac.close(); } }  @Override ApplicationContext resolveApplicationContext(); @Override ApplicationContext resolveApplicationContext(
            BatchJobData batchJobData); @Override void closeApplicationContext(ApplicationContext applicationContext); @Override void afterPropertiesSet(); void setCommonContextClassPath(String[] commonContextClassPath); @Override void destroy();  }
@Test public void testCloseApplicationContext01() throws Exception { ApplicationContext child = new ClassPathXmlApplicationContext( new String[] { "beansDef/B000001.xml" }, parent); target.closeApplicationContext(child); try { child.containsBean("B000001BLogic"); fail(); } catch (IllegalStateException e) { } assertTrue(parent.containsBean("msgAcc")); }
@Test public void testCloseApplicationContext02() throws Exception { ApplicationContext child = mock(ApplicationContext.class); target.closeApplicationContext(child); }