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 shouldGenerateTriFunction() {
    // Given:
    final Pair<String, Class<?>> argName1 = new Pair<>("fred", Long.class);
    final Pair<String, Class<?>> argName2 = new Pair<>("bob", Long.class);
    final Pair<String, Class<?>> argName3 = new Pair<>("tim", Long.class);

    final List<Pair<String, Class<?>>> argList = ImmutableList.of(argName1, argName2, argName3);

    // When:
    final String javaCode = LambdaUtil.toJavaCode(argList, "fred + bob + tim + 1");

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