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