originalList.clear();
}
public void test_sort_01_producer_first() {
addVisitor(new TestConsumer("e", "f"));
addVisitor(new TestProducerConsumer().setProducts("h").setConsumes("g"));
addVisitor(new TestProducer("a", "b", "c"));
addVisitor(new TestVisitor());
addVisitor(new TestConsumer("d", "g"));
addVisitor(new TestProducer("d", "e"));
addVisitor(new TestConsumer("b"));
addVisitor(new TestVisitor());
addVisitor(new TestProducerConsumer().setProducts("g").setConsumes("c"));
Sorter.sort(sortList, Sorter.SortOrder.PRODUCERS_FIRST);
assertEquals(originalList.get(5), sortList.get(0));
assertEquals(originalList.get(2), sortList.get(1));
assertEquals(originalList.get(8), sortList.get(2));