public static ConsumingResult createConsumingResult(
            DataTypeFactory dataTypeFactory,
            TypeInformation<?> inputTypeInfo,
            @Nullable Schema declaredSchema) {
        final DataType inputDataType =
                TypeInfoDataTypeConverter.toDataType(dataTypeFactory, inputTypeInfo);
        return createConsumingResult(dataTypeFactory, inputDataType, declaredSchema, true);
    }
@Test
    void testInvalidDeclaredSchemaColumn() {
        final TypeInformation<?> inputTypeInfo = Types.ROW(Types.INT, Types.LONG);

        assertThatThrownBy(
                        () ->
                                SchemaTranslator.createConsumingResult(
                                        dataTypeFactory(),
                                        inputTypeInfo,
                                        Schema.newBuilder().column("INVALID", BIGINT()).build()))
                .satisfies(
                        anyCauseMatches(
                                ValidationException.class,
                                "Unable to find a field named 'INVALID' in the physical data type"));
    }