static <T extends Type> String encodeDynamicArray(DynamicArray<T> value) {
        int size = value.getValue().size();
        String encodedLength = encode(new Uint(BigInteger.valueOf(size)));
        String valuesOffsets = encodeArrayValuesOffsets(value);
        String encodedValues = encodeArrayValues(value);

        StringBuilder result = new StringBuilder();
        result.append(encodedLength);
        result.append(valuesOffsets);
        result.append(encodedValues);
        return result.toString();
    }
@SuppressWarnings("unchecked")
    @Test
    public void testEmptyArray() {
        DynamicArray<Uint> array = new DynamicArray(Uint.class);
        assertEquals(
                TypeEncoder.encodeDynamicArray(array),
                ("0000000000000000000000000000000000000000000000000000000000000000"));
    }