@Test
public void testBuildPayableFunctionTransaction() throws Exception {

    AbiDefinition functionDefinition = new AbiDefinition(
            false,
            Arrays.asList(
                    new AbiDefinition.NamedType("param", "uint8")),
            "functionName",
            Collections.emptyList(),
            "type",
            true);
    MethodSpec methodSpec = solidityFunctionWrapper.buildFunction(functionDefinition);
    //CHECKSTYLE:OFF
    String expected =
            "public org.web3j.protocol.core.RemoteCall<org.web3j.protocol.core.methods.response.TransactionReceipt> functionName(java.math.BigInteger param, java.math.BigInteger weiValue) {\n"
                    + "  final com.peersafe.abi.datatypes.Function function = new com.peersafe.abi.datatypes.Function(\n"
                    + "      FUNC_FUNCTIONNAME, \n"
                    + "      java.util.Arrays.<com.peersafe.abi.datatypes.Type>asList(new com.peersafe.abi.datatypes.generated.Uint8(param)), \n"
                    + "      java.util.Collections.<com.peersafe.abi.TypeReference<?>>emptyList());\n"
                    + "  return executeRemoteCallTransaction(function, weiValue);\n"
                    + "}\n";
    //CHECKSTYLE:ON
    assertThat(methodSpec.toString(), is(expected));
}