Class[] intfs = (Class[]) getPrivateProperty(pfb, "interfaces");
assertEquals(intfs[0], Object.class);
}
public void testGetServicePropertyComplex() throws Exception {
OsgiServiceProxyFactoryBean pfb = new OsgiServiceProxyFactoryBean();
Method setter = AnnotatedBean.class.getMethod("setAnnotatedBeanTypeComplex",
new Class[] { AnnotatedBean.class });
ServiceReference ref = AnnotationUtils.getAnnotation(setter, ServiceReference.class);
processor.getServiceProperty(pfb, ref, setter, null);
Class[] intfs = (Class[]) getPrivateProperty(pfb, "interfaces");
String filter = (String) getPrivateProperty(pfb, "filter");
String beanName = (String) getPrivateProperty(pfb, "serviceBeanName");
assertEquals(intfs[0], AnnotatedBean.class);
assertFalse(pfb.getCardinality().isMandatory());
assertEquals(ImportContextClassLoader.SERVICE_PROVIDER, pfb.getContextClassLoader());
assertEquals(filter, "(id=fooey)");
assertEquals(beanName, "myBean");
}