P33 { public static List<SimpleEntry<Integer, Integer>> primeFactorsMult(int number) { return P10.encode(P32.primeFactors(number)) .stream() .map(e -> new SimpleEntry<>(e.getValue(), e.getKey())) .collect(toList()); }  static List<SimpleEntry<Integer, Integer>> primeFactorsMult(int number);  }
@Test public void shouldFindPrimeFactorsOf315() throws Exception { List<SimpleEntry<Integer, Integer>> primeFactors = P33.primeFactorsMult(315); assertThat(primeFactors, hasItems(new SimpleEntry<>(3, 2), new SimpleEntry<>(5, 1), new SimpleEntry<>(7, 1))); }
@Test public void shouldFindPrimeFactorsOf33() throws Exception { List<SimpleEntry<Integer, Integer>> primeFactors = P33.primeFactorsMult(33); assertThat(primeFactors, hasItems(new SimpleEntry<>(3, 1), new SimpleEntry<>(11, 1))); }