use of org.eclipse.collections.impl.block.function.NegativeIntervalFunction in project eclipse-collections by eclipse.
the class AbstractImmutableSortedBagTestCase method groupByEach.
@Test
public void groupByEach() {
ImmutableSortedBag<Integer> undertest = this.classUnderTest(Collections.reverseOrder());
NegativeIntervalFunction function = new NegativeIntervalFunction();
ImmutableSortedBagMultimap<Integer, Integer> actual = undertest.groupByEach(function);
ImmutableSortedBagMultimap<Integer, Integer> expected = TreeBag.newBag(undertest).groupByEach(function).toImmutable();
Assert.assertEquals(expected, actual);
Assert.assertSame(Collections.reverseOrder(), actual.comparator());
}
Aggregations