assertNotNull(context.getBean(YarnAppmaster.class));
YarnAppmaster appmaster = context.getBean(YarnAppmaster.class);
GridProjectionFactoryLocator locator = TestUtils.readField("gridProjectionFactoryLocator", appmaster);
Set<GridProjectionFactory> factories = TestUtils.readField("factories", locator);
assertThat(factories.size(), is(1));
GridProjectionFactory factory = factories.iterator().next();
assertThat(factory.getRegisteredProjectionTypes().size(), is(3));
assertThat(factory.getRegisteredProjectionTypes(), containsInAnyOrder("hosts", "racks", "any"));
}