Integers { public static int medianPositiveValue(@NotNull final List<Integer> values) { return median(values, x -> x > 0); } private  Integers(); static int medianPositiveValue(@NotNull final List<Integer> values); static int median(@NotNull final List<Integer> values, Predicate<Integer> filter);  }
@Test public void testMedianNoEntries() { assertEquals(0, Integers.medianPositiveValue(Lists.newArrayList())); }
@Test public void testMedianOneEntry() { assertEquals(5, Integers.medianPositiveValue(Lists.newArrayList(5))); }
@Test public void testMedianTwoEntry() { assertEquals(6, Integers.medianPositiveValue(Lists.newArrayList(7, 5))); }