assertSame("target not properly discovered", service, target);
}
public void testGetTargetWhenMultipleServicesAreAvailable() throws Throwable {
// add service
ServiceEvent event = new ServiceEvent(ServiceEvent.REGISTERED, reference);
listener.serviceChanged(event);
event = new ServiceEvent(ServiceEvent.REGISTERED, ref2);
listener.serviceChanged(event);
Object target = interceptor.getTarget();
assertSame("target not properly discovered", service, target);
createInterceptor(new MockFilter(serv2Filter));
event = new ServiceEvent(ServiceEvent.UNREGISTERING, reference);
listener.serviceChanged(event);
try {
target = interceptor.getTarget();
}