@Override
    public OUT nextRecord(OUT record) throws IOException {
        OUT returnRecord = null;
        do {
            returnRecord = super.nextRecord(record);
        } while (returnRecord == null && !reachedEnd());

        return returnRecord;
    }
@Disabled("Test disabled because we do not support double-quote escaped quotes right now.")
    @Test
    void testParserCorrectness() throws Exception {
        // RFC 4180 Compliance Test content
        // Taken from http://en.wikipedia.org/wiki/Comma-separated_values#Example
        final String fileContent =
                "Year,Make,Model,Description,Price\n"
                        + "1997,Ford,E350,\"ac, abs, moon\",3000.00\n"
                        + "1999,Chevy,\"Venture \"\"Extended Edition\"\"\",\"\",4900.00\n"
                        + "1996,Jeep,Grand Cherokee,\"MUST SELL! air, moon roof, loaded\",4799.00\n"
                        + "1999,Chevy,\"Venture \"\"Extended Edition, Very Large\"\"\",,5000.00\n"
                        + ",,\"Venture \"\"Extended Edition\"\"\",\"\",4900.00";

        final FileInputSplit split = createTempFile(fileContent);

        final TupleTypeInfo<Tuple5<Integer, String, String, String, Double>> typeInfo =
                TupleTypeInfo.getBasicTupleTypeInfo(
                        Integer.class, String.class, String.class, String.class, Double.class);
        final CsvInputFormat<Tuple5<Integer, String, String, String, Double>> format =
                new TupleCsvInputFormat<>(PATH, typeInfo);

        format.setSkipFirstLineAsHeader(true);
        format.setFieldDelimiter(",");

        format.configure(new Configuration());
        format.open(split);

        Tuple5<Integer, String, String, String, Double> result = new Tuple5<>();

        @SuppressWarnings("unchecked")
        Tuple5<Integer, String, String, String, Double>[] expectedLines =
                new Tuple5[] {
                    new Tuple5<>(1997, "Ford", "E350", "ac, abs, moon", 3000.0),
                    new Tuple5<>(1999, "Chevy", "Venture \"Extended Edition\"", "", 4900.0),
                    new Tuple5<>(
                            1996,
                            "Jeep",
                            "Grand Cherokee",
                            "MUST SELL! air, moon roof, loaded",
                            4799.00),
                    new Tuple5<>(
                            1999, "Chevy", "Venture \"Extended Edition, Very Large\"", "", 5000.00),
                    new Tuple5<>(0, "", "Venture \"Extended Edition\"", "", 4900.0)
                };

        try {
            for (Tuple5<Integer, String, String, String, Double> expected : expectedLines) {
                result = format.nextRecord(result);
                assertThat(result).isEqualTo(expected);
            }

            assertThat(format.nextRecord(result)).isNull();
            assertThat(format.reachedEnd()).isTrue();

        } catch (Exception ex) {
            fail("Test failed due to a " + ex.getClass().getName() + ": " + ex.getMessage());
        }
    }