public static <InputT, OutputT> MapElements<InputT, OutputT> via(
      final InferableFunction<InputT, OutputT> fn) {
    return new MapElements<>(fn, fn.getInputTypeDescriptor(), fn.getOutputTypeDescriptor());
  }
@Test
  public void testPolymorphicInferableFunction() throws Exception {
    pipeline.enableAbandonedNodeEnforcement(false);

    pipeline
        .apply(Create.of(1, 2, 3))
        .apply("Polymorphic Identity", MapElements.via(new PolymorphicInferableFunction<>()))
        .apply(
            "Test Consumer",
            MapElements.via(
                new InferableFunction<Integer, Integer>() {
                  @Override
                  public Integer apply(Integer input) throws Exception {
                    return input;
                  }
                }));
  }