when(bundleContext.getServiceReferences(ServiceInterface.class.getName(), null)).thenReturn(
new ServiceReference[] { ref1, ref2 });
Resource res = mock(Resource.class);
CollectionOSGiModel model = factory.getAdapter(res, CollectionOSGiModel.class);
assertNotNull(model);
assertNotNull(model.getServices());
assertEquals(2, model.getServices().size());
assertTrue(model.getServices().contains(service1));
assertTrue(model.getServices().contains(service2));
verifyNoMoreInteractions(res);
}