Set<Class<CamelContextFactory>> camelContextFactories = DeploymentScanner.getContextInstance(context).lookupSubtypes(CamelContextFactory.class);
</BUG>
if (camelContextFactories.size() >= 2) {
throw new SilverWareException("More than one CamelContextFactories found.");
} else if (camelContextFactories.size() == 1) {
<BUG>Class<CamelContextFactory> clazz = camelContextFactories.iterator().next();
</BUG>
try {
CamelContextFactory camelContextFactory = clazz.newInstance();
camelContext = camelContextFactory.createCamelContext(context);

private CamelContext camelContext;
private final List<RouteBuilder> routes = new ArrayList<>();
private Set<String> routeResources;
private final DeployStats stats = new DeployStats();
private void createCamelContext() throws SilverWareException {
Set<Class<? extends CamelContextFactory>> camelContextFactories = DeploymentScanner.getContextInstance(context).lookupSubtypes(CamelContextFactory.class);
if (camelContextFactories.size() >= 2) {
throw new SilverWareException("More than one CamelContextFactories found.");
} else if (camelContextFactories.size() == 1) {
Class<? extends CamelContextFactory> clazz = camelContextFactories.iterator().next();
try {
CamelContextFactory camelContextFactory = clazz.newInstance();
camelContext = camelContextFactory.createCamelContext(context);
