import org.apache.camel.NoFactoryAvailableException;
import org.apache.camel.impl.DefaultClassResolver;
public class OsgiFactoryFinderTest extends CamelOsgiTestSupport {
public void testFindClass() throws Exception {
OsgiFactoryFinder finder = new OsgiFactoryFinder(new DefaultClassResolver(), "META-INF/services/org/apache/camel/component/");
Class clazz = finder.findClass("file_test", "strategy.factory.");
assertNotNull("We should get the file strategy factory here", clazz);
try {
clazz = finder.findClass("nofile", "strategy.factory.");