assertThat(ReflectionTestUtils.getField(cacheFactoryBean, "factoryLocator"), is(nullValue()));
GemfireBeanFactoryLocator beanFactoryLocator = new GemfireBeanFactoryLocator();
try {
assertNotNull(beanFactoryLocator.useBeanFactory("cache-with-name"));
beanFactoryLocator.useBeanFactory("no-bean-factory-locator");
}
finally {
beanFactoryLocator.destroy();
}