### Question:
ContextAwareSessionFactory extends SpringSessionFactory implements ApplicationContextAware { @Override public void setApplicationContext(ApplicationContext applicationContext) { setObjectRepositories(Collections.<String, ObjectRepository> singletonMap( namespace, new SpringObjectRepository(applicationContext))); } ContextAwareSessionFactory();  ContextAwareSessionFactory(String namespace); @Override void setApplicationContext(ApplicationContext applicationContext); void setNamespace(String namespace);  }### Answer:
@Test public void test() { ContextAwareSessionFactory sessionFactory = new ContextAwareSessionFactory(TEST.NS); ApplicationContext appContext = new StaticApplicationContext(); sessionFactory.setApplicationContext(appContext); }