Median { public static Ordinality ordinality(int pivot, List<List<Integer>> lists) { Ordinality result = Ordinality.EMPTY; for (List<Integer> list : lists) { result = result.update(listOrdinality(pivot, list)); } return result; }  static int of(List<List<Integer>> ints); static int max(List<List<Integer>> lists); static int min(List<List<Integer>> lists); static Ordinality ordinality(int pivot, List<List<Integer>> lists);  }
@Test public void ordinality_of_one_list() { Assert.assertEquals(new Ordinality(1, 1, 1), Median.ordinality(2, Lists.<List<Integer>>newArrayList( Lists.newArrayList(1, 3, 2)))); }
@Test public void ordinality_of_another_list() { Assert.assertEquals(new Ordinality(2, 0, 1), Median.ordinality(3, Lists.<List<Integer>>newArrayList( Lists.newArrayList(1, 3, 2)))); }
@Test public void ordinality_of_2_lists() { Assert.assertEquals(new Ordinality(5, 1, 0), Median.ordinality(5, Lists.<List<Integer>>newArrayList( Lists.newArrayList(1, 3, 2), Lists.newArrayList(2, 4, 7)))); }