public static Type instantiateType(String solidityType, Object value)
            throws InvocationTargetException,
                    NoSuchMethodException,
                    InstantiationException,
                    IllegalAccessException,
                    ClassNotFoundException {
        return instantiateType(makeTypeReference(solidityType), value);
    }
@SuppressWarnings("unchecked")
    @Test
    public void multiDimArrays() throws Exception {
        byte[] bytes1d = new byte[] {1, 2, 3};
        byte[][] bytes2d = new byte[][] {bytes1d, bytes1d, bytes1d};
        final byte[][][] bytes3d = new byte[][][] {bytes2d, bytes2d, bytes2d};

        assertEquals(TypeDecoder.instantiateType("bytes", bytes1d), (new DynamicBytes(bytes1d)));

        Type twoDim = TypeDecoder.instantiateType("uint256[][3]", bytes2d);
        assertTrue(twoDim instanceof StaticArray3);
        StaticArray3<DynamicArray<Uint256>> staticArray3 =
                (StaticArray3<DynamicArray<Uint256>>) twoDim;
        assertEquals(staticArray3.getComponentType(), DynamicArray.class);
        DynamicArray<Uint256> row1 = staticArray3.getValue().get(1);
        assertEquals(row1.getValue().get(2), new Uint256(3));

        Type threeDim = TypeDecoder.instantiateType("uint256[][3][3]", bytes3d);
        assertTrue(threeDim instanceof StaticArray3);
        StaticArray3<StaticArray3<DynamicArray<Uint256>>> staticArray3StaticArray3 =
                (StaticArray3<StaticArray3<DynamicArray<Uint256>>>) threeDim;
        assertEquals(staticArray3StaticArray3.getComponentType(), StaticArray3.class);
        row1 = staticArray3StaticArray3.getValue().get(1).getValue().get(1);
        assertEquals(row1.getValue().get(1), (new Uint256(2)));
    }