public static String toJavaCode(
      final String argName,
      final Class<?> argType,
      final String lambdaBody
  ) {
    return toJavaCode(ImmutableList.of(new Pair<>(argName, argType)), lambdaBody);
  }
@Test
  public void shouldGenerateFunctionCode() {
    // Given:
    final String argName = "fred";
    final Class<?> argType = Long.class;

    // When:
    final String javaCode = LambdaUtil
        .toJavaCode(argName, argType, argName + " + 1");

    // Then:
    final Object result = CodeGenTestUtil.cookAndEval(javaCode, Function.class);
    assertThat(result, is(instanceOf(Function.class)));
    assertThat(((Function<Object, Object>) result).apply(10L), is(11L));
  }