public static Function<Integer, Integer> composeFunctions(Function<Integer, Integer> f1, Function<Integer, Integer> f2) {
    return f1.andThen(f2);
  }
@Test
  public void testComposeWithIdentity() {
    Function<Integer, Integer> identity = Function.identity();
    Function<Integer, Integer> timesThree = x -> x * 3;

    Function<Integer, Integer> composedLeft = FunctionComposer.composeFunctions(identity, timesThree);
    Function<Integer, Integer> composedRight = FunctionComposer.composeFunctions(timesThree, identity);

    assertEquals("Composition with identity on the left should be the same", 9, (int) composedLeft.apply(3));
    assertEquals("Composition with identity on the right should be the same", 9, (int) composedRight.apply(3));
  }