super.setUp();
sorter = new ServiceReferenceSorter();
}
public void testSort() {
ServiceRegistryEntry ref1 = newRef(new Integer(1));
ServiceRegistryEntry ref2 = newRef("nothing");
ServiceRegistryEntry ref3 = newRef(-100);
ServiceRegistryEntry ref4 = newRef(400);
ServiceRegistryEntry ref5 = newRef(Long.MAX_VALUE);
ServiceRegistryEntry ref6 = newRef(new Double(Integer.MAX_VALUE + ".51"));
List<ServiceRegistryEntry> list = Arrays.asList(ref1, ref2, ref3, ref4, ref5, ref6);
List<ServiceRegistryEntry> sorted = sorter.sort(list);
List<ServiceRegistryEntry> expected = Arrays.asList(ref5, ref6, ref4, ref1, ref2, ref3);
System.out.println("sorted:" + sorted);