@Test
public void testGetServiceIds() throws Exception {

    
    assertEquals(0, getServiceIds(null).length);
    assertEquals(0, getServiceIds(new ServiceReference[0]).length);
    
    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(5));
    ServiceReference s3 = mock(ServiceReference.class);
    when(s3.getProperty(Constants.SERVICE_ID)).thenReturn(new Long(25));
    
    assertArrayEquals(new long[] { 15, 5, 25 }, 
            getServiceIds(new ServiceReference[] {s1, s2, s3} ) );
}