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