TypeDecoder { @SuppressWarnings("unchecked") static <T extends Type> T decodeStaticArray( String input, int offset, TypeReference<T> typeReference, int length) { return decodeArrayElements(input, offset, typeReference, length, false); }  static T decode(
            String input, int offset, TypeReference<T> typeReference);  }
@Test public void testStaticArray() { assertThat(TypeDecoder.decodeStaticArray( "000000000000000000000000000000000000000000000000000000000000000a" + "0000000000000000000000000000000000000000000000007fffffffffffffff", 0, new TypeReference.StaticArrayTypeReference<StaticArray<Uint256>>(2) {}, 2), is(new StaticArray<Uint256>( new Uint256(BigInteger.TEN), new Uint256(BigInteger.valueOf(Long.MAX_VALUE))))); assertThat(TypeDecoder.decodeStaticArray( "000000000000000000000000000000000000000000000000000000000000000d" + "48656c6c6f2c20776f726c642100000000000000000000000000000000000000" + "000000000000000000000000000000000000000000000000000000000000000d" + "776f726c64212048656c6c6f2c00000000000000000000000000000000000000", 0, new TypeReference.StaticArrayTypeReference<StaticArray<Utf8String>>(2){}, 2 ), equalTo(new StaticArray<Utf8String>( new Utf8String("Hello, world!"), new Utf8String("world! Hello,")))); }
@Test(expected = UnsupportedOperationException.class) public void testEmptyStaticArray() { TypeDecoder.decodeStaticArray( "0000000000000000000000000000000000000000000000000000000000000000", 0, new TypeReference.StaticArrayTypeReference<StaticArray<Uint256>>(0) {}, 0); }