}
protected void addService(Object service, Dictionary properties) {
ServiceReference ref = null;
ServiceEvent event = null;
Set intfs = ClassUtils.getAllInterfacesAsSet(service);
String[] clazzez = new String[intfs.size()];
int i = 0;
for (Iterator iter = intfs.iterator(); iter.hasNext();) {
clazzez[i++] = ((Class) iter.next()).getName();
}
ref = new MockServiceReference(null, properties, null, clazzez);
event = new ServiceEvent(ServiceEvent.REGISTERED, ref);
services.put(ref, service);
for (Iterator iter = context.getServiceListeners().iterator(); iter.hasNext();) {
ServiceListener listener = (ServiceListener) iter.next();