@Override
    public String toString() {
        return "CSV Input ("
                + StringUtils.showControlCharacters(String.valueOf(getFieldDelimiter()))
                + ") "
                + Arrays.toString(getFilePaths());
    }
@Test
    void testPojoTypeWithInvalidFieldMapping() throws Exception {
        File tempFile = File.createTempFile("CsvReaderPojoType", "tmp");
        tempFile.deleteOnExit();
        tempFile.setWritable(true);

        @SuppressWarnings("unchecked")
        PojoTypeInfo<PojoItem> typeInfo =
                (PojoTypeInfo<PojoItem>) TypeExtractor.createTypeInfo(PojoItem.class);

        try {
            new PojoCsvInputFormat<>(
                    new Path(tempFile.toURI().toString()),
                    typeInfo,
                    new String[] {"field1", "field2"});
            fail("The number of POJO fields cannot be same as that of selected CSV fields");
        } catch (IllegalArgumentException e) {
            // success
        }

        try {
            new PojoCsvInputFormat<>(
                    new Path(tempFile.toURI().toString()),
                    typeInfo,
                    new String[] {"field1", "field2", null, "field4"});
            fail("Fields mapping cannot contain null.");
        } catch (NullPointerException e) {
            // success
        }

        try {
            new PojoCsvInputFormat<>(
                    new Path(tempFile.toURI().toString()),
                    typeInfo,
                    new String[] {"field1", "field2", "field3", "field5"});
            fail("Invalid field name");
        } catch (IllegalArgumentException e) {
            // success
        }
    }