ServiceReference<?> refInteger = bundleContext.getServiceReference(Integer.class.getName());
assertSame(reg3.getReference(), refInteger);
ServiceReference<?>[] refsString = bundleContext.getServiceReferences(String.class.getName(), null);
assertEquals(2, refsString.length);
assertSame(reg1.getReference(), refsString[0]);
<BUG>assertSame(reg2.getReference(), refsString[1]);
ServiceReference<?>[] refsInteger = bundleContext.getServiceReferences(Integer.class.getName(), null);</BUG>
assertEquals(2, refsInteger.length);
assertSame(reg3.getReference(), refsInteger[0]);
assertSame(reg2.getReference(), refsInteger[1]);

ServiceReference<?> refInteger = bundleContext.getServiceReference(Integer.class.getName());
assertSame(reg3.getReference(), refInteger);
ServiceReference<?>[] refsString = bundleContext.getServiceReferences(String.class.getName(), null);
assertEquals(2, refsString.length);
assertSame(reg1.getReference(), refsString[0]);
assertSame(reg2.getReference(), refsString[1]);
Collection<ServiceReference<String>> refColString = bundleContext.getServiceReferences(String.class, null);
assertEquals(2, refColString.size());
assertSame(reg1.getReference(), refColString.iterator().next());
ServiceReference<?>[] refsInteger = bundleContext.getServiceReferences(Integer.class.getName(), null);
assertEquals(2, refsInteger.length);
assertSame(reg3.getReference(), refsInteger[0]);
assertSame(reg2.getReference(), refsInteger[1]);
