public Sample readSample() {
        Sample out = lastSampleRead;
        lastSampleRead = nextSample();
        return out;
    }
@Test
    public void testReadSample() {
        try (CsvSampleReader reader = new CsvSampleReader(tempCsv, metadata)) {
            for (long i = 0; i < NR_ROWS; i++) {
                Sample expected = new SampleBuilder(metadata).add(i)
                        .add("a" + i).build();
                assertThat(reader.readSample().toString(),
                        CoreMatchers.is(expected.toString()));
            }
        }
    }