public static <IN, OUT1, OUT2>
            Tuple2<TypeInformation<OUT1>, TypeInformation<OUT2>>
                    getOutputTypesForTwoOutputProcessFunction(
                            TwoOutputStreamProcessFunction<IN, OUT1, OUT2>
                                    twoOutputStreamProcessFunction,
                            TypeInformation<IN> inTypeInformation) {
        TypeInformation<OUT1> firstOutputType =
                TypeExtractor.getUnaryOperatorReturnType(
                        twoOutputStreamProcessFunction,
                        TwoOutputStreamProcessFunction.class,
                        0,
                        1,
                        new int[] {1, 0},
                        inTypeInformation,
                        Utils.getCallLocationName(),
                        true);
        TypeInformation<OUT2> secondOutputType =
                TypeExtractor.getUnaryOperatorReturnType(
                        twoOutputStreamProcessFunction,
                        TwoOutputStreamProcessFunction.class,
                        0,
                        2,
                        new int[] {2, 0},
                        inTypeInformation,
                        Utils.getCallLocationName(),
                        true);
        return Tuple2.of(firstOutputType, secondOutputType);
    }
@Test
    void testTwoOutputType() {
        Tuple2<TypeInformation<Long>, TypeInformation<String>> outputType =
                StreamUtils.getOutputTypesForTwoOutputProcessFunction(
                        new TwoOutputStreamProcessFunction<Integer, Long, String>() {
                            @Override
                            public void processRecord(
                                    Integer record,
                                    Collector<Long> output1,
                                    Collector<String> output2,
                                    PartitionedContext ctx)
                                    throws Exception {
                                // ignore
                            }
                        },
                        Types.INT);
        assertThat(outputType.f0).isEqualTo(Types.LONG);
        assertThat(outputType.f1).isEqualTo(Types.STRING);
    }