public static List<Type> decode(String rawInput, List<TypeReference<Type>> outputParameters) {
        return decoder.decodeFunctionResult(rawInput, outputParameters);
    }
@Test
    public void testBuildDynamicStructWithStaticStruct() throws ClassNotFoundException {
        // This is a version of testDecodeDynamicStructWithStaticStruct() that builds
        // the decoding TypeReferences using inner types.
        String rawInput =
                "0x0000000000000000000000000000000000000000000000000000000000000020"
                        + "0000000000000000000000000000000000000000000000000000000000000001"
                        + "000000000000000000000000000000000000000000000000000000000000000a"
                        + "0000000000000000000000000000000000000000000000000000000000000060"
                        + "0000000000000000000000000000000000000000000000000000000000000004"
                        + "6461746100000000000000000000000000000000000000000000000000000000";
        // (uint256, uint256) static struct.
        TypeReference<StaticStruct> staticStruct =
                new TypeReference<StaticStruct>(
                        false,
                        Arrays.asList(
                                TypeReference.makeTypeReference("uint256"),
                                TypeReference.makeTypeReference("uint256"))) {};

        // ((uint256, uint256), string) dynamic struct containing static struct.
        TypeReference<DynamicStruct> dynamicStruct =
                new TypeReference<DynamicStruct>(
                        false,
                        Arrays.asList(staticStruct, TypeReference.makeTypeReference("string"))) {};

        List<Type> decodedData =
                FunctionReturnDecoder.decode(rawInput, Utils.convert(Arrays.asList(dynamicStruct)));
        List<Type> decodedDynamicStruct = ((DynamicStruct) decodedData.get(0)).getValue();

        List<Type> decodedStaticStruct = ((StaticStruct) decodedDynamicStruct.get(0)).getValue();
        assertEquals(decodedStaticStruct.get(0).getValue(), BigInteger.ONE);
        assertEquals(decodedStaticStruct.get(1).getValue(), BigInteger.TEN);

        assertEquals(decodedDynamicStruct.get(1).getValue(), "data");
    }