Java, Eclipse Collections, Open Source, Programming, Software Development.
convertToBagForEquality() { MutableList<Fruit> list = Lists.mutable.of(Fruit.BANANA, Fruit.BANANA, Fruit.APPLE, Fruit.CHERRY); // Using a Bag we can test size and contents without caring about order Bag<Fruit> bag = list.toBag(); Assertions.assertEquals( bag, Bags.mutable.of(Fruit.CHERRY,