@Test
public void testExceptionCase() {

    TableSchema expectSchema = new TableSchema(
        new String[]{"f0", "res"},
        new TypeInformation[]{
            TypeInformation.of(String.class),
            TypeInformation.of(Integer.class)
        }
    );
    OutputColsHelper helper = new OutputColsHelper(
        tableSchema, new String[]{"res", "f0"},
        new TypeInformation[]{
            TypeInformation.of(Integer.class),
            TypeInformation.of(String.class)
        },
        new String[]{"res", "res2"}
    );
    Assert.assertEquals(helper.getResultSchema(), expectSchema);
    expectSchema = new TableSchema(
        new String[]{"f0", "f1", "res"},
        new TypeInformation[]{
            TypeInformation.of(String.class),
            TypeInformation.of(Long.class),
            TypeInformation.of(Integer.class)
        }
    );
    helper = new OutputColsHelper(
        tableSchema, new String[]{"res", "f0"},
        new TypeInformation[]{
            TypeInformation.of(Integer.class),
            TypeInformation.of(String.class)
        },
        new String[]{"f1", "res"}
    );
    Assert.assertEquals(helper.getResultSchema(), expectSchema);
    expectSchema = new TableSchema(
        new String[]{"f0", "f1", "f2"},
        new TypeInformation[]{
            TypeInformation.of(String.class),
            TypeInformation.of(Integer.class),
            TypeInformation.of(Double.class)
        }
    );
    helper = new OutputColsHelper(
        tableSchema, new String[]{"f1", "f0", "f2"},
        new TypeInformation[]{
            TypeInformation.of(Integer.class),
            TypeInformation.of(String.class),
            TypeInformation.of(Double.class)
        },
        new String[]{"f1", "res"}
    );
    Assert.assertEquals(helper.getResultSchema(), expectSchema);
}