@Test public void testSignHandlingCommutative() { List<Band> bands = new ArrayList<>(); bands.add(createBand("spec_a", 75)); bands.add(createBand("spec_b", 70)); final Comparator<Band> comparator = BandSorter.createComparator(); assertEquals(-1, comparator.compare(bands.get(0), bands.get(1))); assertEquals(1, comparator.compare(bands.get(1), bands.get(0))); }
static Comparator<Band> createComparator() { return Comparator.comparing(ProductNode::getName); }
BandSorter { static Comparator<Band> createComparator() { return Comparator.comparing(ProductNode::getName); } }
BandSorter { static Comparator<Band> createComparator() { return Comparator.comparing(ProductNode::getName); }  }
BandSorter { static Comparator<Band> createComparator() { return Comparator.comparing(ProductNode::getName); }   }
BandSorter { static Comparator<Band> createComparator() { return Comparator.comparing(ProductNode::getName); }    }