@Test
public void testInvocationBuilder() {

  final ContractAddress address = new ContractAddress(encodedAddress);
  final String version = randomUUID().toString();
  final String language = randomUUID().toString();
  final ContractFunction function = new ContractFunction(functionName,
      Collections.<String>emptyList(), false, false, true);
  final List<ContractFunction> functions = asList(function);
  final List<StateVariable> stateVariables = new ArrayList<StateVariable>();
  final ContractInterface contractInterface = ContractInterface.newBuilder()
      .address(address)
      .version(version)
      .language(language)
      .functions(functions)
      .stateVariables(stateVariables)
      .build();
  final Object[] args = new Object[]{randomUUID().toString(), randomUUID().toString()};
  final ContractInvocation expected = ContractInvocation
      .newBuilder()
      .address(address)
      .functionName(functionName)
      .args(asList(args))
      .amount(Aer.EMPTY)
      .delegateFee(true)
      .build();
  final ContractInvocation actual = contractInterface.newInvocationBuilder()
      .function(functionName)
      .args(args)
      .amount(Aer.EMPTY)
      .delegateFee(true)
      .build();
  assertEquals(expected, actual);
}