@Test
public void testFunctionMDynamicArrayEncode2() {

    Function function = new Function(
            "f",
            Arrays.asList(
                new Uint(BigInteger.valueOf(0x123)),
                new DynamicArray<>(
                        new Uint32(BigInteger.valueOf(0x456)),
                        new Uint32(BigInteger.valueOf(0x789))
                ),
                new Bytes10("1234567890".getBytes()),
                new DynamicBytes("Hello, world!".getBytes())),
            Collections.<TypeReference<?>>emptyList()
    );
    assertThat(FunctionEncoder.encode(function),
            is("0x8be65246"
                    + "0000000000000000000000000000000000000000000000000000000000000123"
                    + "0000000000000000000000000000000000000000000000000000000000000080"
                    + "3132333435363738393000000000000000000000000000000000000000000000"
                    + "00000000000000000000000000000000000000000000000000000000000000e0"
                    + "0000000000000000000000000000000000000000000000000000000000000002"
                    + "0000000000000000000000000000000000000000000000000000000000000456"
                    + "0000000000000000000000000000000000000000000000000000000000000789"
                    + "000000000000000000000000000000000000000000000000000000000000000d"
                    + "48656c6c6f2c20776f726c642100000000000000000000000000000000000000"
            ));
}