### Question:
Exercise6 { static <A, B, C> Function1<A, C> applySecond(final Function1<A, Function1<B, C>> function, final Supplier<B> supplier) { return (A a) -> function.apply(a).apply(supplier.get()); }    }### Answer:
@Test public void should_apply_second_argument() { final Supplier<Integer> supplier = () -> 42; final Function1<String, Function1<Integer, String>> function = string -> integer -> String.format("%s : %d", string, integer); final Function1<String, String> tested = Exercise6.applySecond(function, supplier); assertEquals(function.apply("foo").apply(42), tested.apply("foo")); }