@Test
 public void testHasNextRecordForEmptyFile() throws Exception {
   flatFileRecordReader.close();
   flatFileRecordReader = new FlatFileRecordReader(emptyDataSource);
   flatFileRecordReader.open();
   assertThat(flatFileRecordReader.hasNextRecord()).isFalse();
 }
 @After
 public void tearDown() throws Exception {
   flatFileRecordReader.close();
 }
 @Test
 public void testTotalRecordsForNonExistingFile() throws Exception {
   flatFileRecordReader.close();
   flatFileRecordReader = new FlatFileRecordReader(nonExistingDataSource);
   assertThat(flatFileRecordReader.getTotalRecords()).isNull();
 }
 @Test
 public void testTotalRecordsForEmptyFile() throws Exception {
   flatFileRecordReader.close();
   flatFileRecordReader = new FlatFileRecordReader(emptyDataSource);
   assertThat(flatFileRecordReader.getTotalRecords()).isEqualTo(0l);
 }