PlainFileLineIterator extends AbstractFileLineIterator<Object> { @Override public List<String> getTrailer() { List<String> trailer = super.getTrailer(); readTrailer = true; return trailer; } @SuppressWarnings("unchecked")  PlainFileLineIterator(String fileName,
            @SuppressWarnings("rawtypes") Class clazz,
            Map<String, ColumnParser> columnParserMap); @Override String[] separateColumns(String fileLineString); @Override String next(); void skip(int skipLines); @Override List<String> getTrailer(); @Override char getDelimiter(); @Override char getEncloseChar(); @Override int getCurrentLineCount();  }
@Test public void testGetTrailer01() throws Exception { URL url = this.getClass().getResource("PlainFileLineIterator03.txt"); String fileName = url.getPath(); Class<PlainFileLineIterator_Stub03> clazz = PlainFileLineIterator_Stub03.class; Map<String, ColumnParser> columnParserMap = new HashMap<String, ColumnParser>(); columnParserMap.put("java.lang.String", new NullColumnParser()); PlainFileLineIterator plainFileLineIterator = new PlainFileLineIterator(fileName, clazz, columnParserMap); List<String> trailer = plainFileLineIterator.getTrailer(); assertEquals(1, trailer.size()); assertEquals("trailer data", trailer.get(0)); assertTrue((Boolean) ReflectionTestUtils.getField(plainFileLineIterator, "readTrailer")); }