### Question:
Functions { public static <T, U> Predicate<T> by(final Function<? super T, ? extends U> mapper, final Predicate<? super U> predicate) { return t -> predicate.test(mapper.apply(t)); } private  Functions(); static Predicate<T> by(final Function<? super T, ? extends U> mapper,
            final Predicate<? super U> predicate); static Function<T, Stream<R>> filterMap(final Predicate<? super T> predicate,
            final Function<? super T, ? extends R> mapper); static Function<U, R> applyPartial(
            final BiFunction<? super T, ? super U, ? extends R> mapper, final T t);  }### Answer:
@Test void test_by() throws Exception { final Object[] os1 = Stream.of("foo", "hello", "hoge").filter(s -> s.length() == 5) .toArray(); assertThat(os1).contains("hello"); final Object[] os2 = Stream.of("foo", "hello", "hoge") .filter(by(String::length, isEqual(5))) .toArray(); assertThat(os2).contains("hello"); }