@SuppressWarnings("unchecked")
    public static <T extends Type> T decodeStaticArray(
            String input, int offset, TypeReference<T> typeReference, int length) {

        BiFunction<List<T>, String, T> function =
                (elements, typeName) -> {
                    if (elements.isEmpty()) {
                        throw new UnsupportedOperationException(
                                "Zero length fixed array is invalid type");
                    } else {
                        return instantiateStaticArray(elements, length);
                    }
                };

        return decodeArrayElements(input, offset, typeReference, length, function);
    }
@Test
    public void testEmptyStaticArray() {
        assertThrows(
                UnsupportedOperationException.class,
                () ->
                        TypeDecoder.decodeStaticArray(
                                "0000000000000000000000000000000000000000000000000000000000000000",
                                0,
                                new TypeReference.StaticArrayTypeReference<StaticArray<Uint256>>(
                                        0) {},
                                0));
    }