TCollections { public static Collection<?> smallerBetween(Collection<?> a, Collection<?> b) { return a.size() == b.size() || a.size() < b.size() ? a : b; } private  TCollections(); static Collection<?> smallerBetween(Collection<?> a,
            Collection<?> b); static Collection<?> largerBetween(Collection<?> a,
            Collection<?> b); static T getRandomElement(Collection<T> collection); static String toOrderedListString(Iterable<T> collection);  }
@Test public void testSmallerBetween() { int aSize = TestData.getScaleCount(); int bSize = (int) (aSize * 1.35); Collection<Integer> a = getCollection(aSize); Collection<Integer> b = getCollection(bSize); Assert.assertEquals(a, TCollections.smallerBetween(a, b)); }
@Test public void testSmallerBetweenSameSize() { int aSize = TestData.getScaleCount(); Collection<Integer> a = getCollection(aSize); Collection<Integer> b = getCollection(aSize); Assert.assertEquals(a, TCollections.smallerBetween(a, b)); }