@Test
public void testGetServicesInUseByBundle() throws Exception {

    
    Bundle bundle = mock(Bundle.class);
    
    ServiceReference s1 = mock(ServiceReference.class);
    when(s1.getProperty(Constants.SERVICE_ID)).thenReturn(new Long(15));
    ServiceReference s2 = mock(ServiceReference.class);
    when(s2.getProperty(Constants.SERVICE_ID)).thenReturn(new Long(16));
    ServiceReference s3 = mock(ServiceReference.class);
    when(s3.getProperty(Constants.SERVICE_ID)).thenReturn(new Long(17));
    
    when(bundle.getServicesInUse()).thenReturn(new ServiceReference[] { s1, s2, s3 });
    
    assertArrayEquals(new long[] { 15, 16, 17 }, getServicesInUseByBundle(bundle));
    
}