@Test
public void testGetRegisteredServiceIds() throws Exception {

    
    Bundle bundle = mock(Bundle.class);
    
    ServiceReference s1 = mock(ServiceReference.class);
    when(s1.getProperty(Constants.SERVICE_ID)).thenReturn(new Long(56));
    ServiceReference s2 = mock(ServiceReference.class);
    when(s2.getProperty(Constants.SERVICE_ID)).thenReturn(new Long(5));
    ServiceReference s3 = mock(ServiceReference.class);
    when(s3.getProperty(Constants.SERVICE_ID)).thenReturn(new Long(34));
    
    when(bundle.getRegisteredServices()).thenReturn(new ServiceReference[] { s1, s2, s3 });
    
    assertArrayEquals(new long[] { 56, 5, 34}, getRegisteredServiceIds(bundle));
    
}