fail("Expecting IllegalArgumentException for null bag");
} catch (IllegalArgumentException e) {}
}
public void testSortOrder() {
SortedBag bag = decorateBag(new TreeBag(), stringClass);
String one = "one";
String two = "two";
String three = "three";
bag.add(one);
bag.add(two);
bag.add(three);
assertEquals("first element", bag.first(), one);
assertEquals("last element", bag.last(), two);
Comparator c = bag.comparator();
assertTrue("natural order, so comparator should be null", c == null);
}