}
public Object getService(@SuppressWarnings("rawtypes") ServiceReference reference) {
String[] classNames = (String[]) reference.getProperty(Constants.OBJECTCLASS);
if (classNames[0].equals("org.apache.camel.core.osgi.test.MyService")) {
return new MyService();
} else if (classNames[0].equals(ComponentResolver.class.getName())) {
return new ComponentResolver() {
public Component resolveComponent(String name, CamelContext context) throws Exception {
if (name.equals("file_test")) {
return new FileComponent();