FileSystemApplicationContextFactory implements ApplicationContextFactory, ApplicationContextAware { public void setBeanClassLoader(ClassLoader beanClassLoader) { this.beanClassLoader = beanClassLoader; } FileSystemApplicationContextFactory();  FileSystemApplicationContextFactory(Resource resource); void setResource(Resource resource); void setCopyConfiguration(boolean copyConfiguration); void setBeanFactoryPostProcessorClasses(Class<? extends BeanFactoryPostProcessor>[] beanFactoryPostProcessorClasses); void setBeanPostProcessorExcludeClasses(Class<?>[] beanPostProcessorExcludeClasses); void setApplicationContext(ApplicationContext applicationContext); ConfigurableApplicationContext createApplicationContext(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); ClassLoader getBeanClassLoader(); void setBeanClassLoader(ClassLoader beanClassLoader);  }
@Test public void testSetBeanClassLoader() { ClassLoader threadClassLoader = Thread.currentThread().getContextClassLoader(); contextFactory.setBeanClassLoader(threadClassLoader); ClassLoader loader = contextFactory.getBeanClassLoader(); Assert.assertSame(threadClassLoader, loader); }