AbstractFileLineIterator implements
                                              FileLineIterator<T> { @Override public List<String> getHeader() { return header; } AbstractFileLineIterator(String fileName, Class<T> clazz,
            Map<String, ColumnParser> columnParserMap); @Override boolean hasNext(); @Override T next(); @Override void remove(); @Override void closeFile(); @Override List<String> getHeader(); @Override List<String> getTrailer(); @Override void skip(int skipLines); int getCurrentLineCount();  }
@Test public void testGetHeader01() throws Exception { URL url = this.getClass().getResource("File_Empty.txt"); String fileName = url.getPath(); Map<String, ColumnParser> columnParserMap = new HashMap<String, ColumnParser>(); columnParserMap.put("java.lang.String", new NullColumnParser()); AbstractFileLineIteratorImpl02<AbstractFileLineIterator_Stub07> fileLineIterator = new AbstractFileLineIteratorImpl02<AbstractFileLineIterator_Stub07>( fileName, AbstractFileLineIterator_Stub07.class, columnParserMap); List<String> header = new ArrayList<String>(); header.add("ヘッダ行1"); header.add("ヘッダ行2"); header.add("ヘッダ行3"); ReflectionTestUtils.setField(fileLineIterator, "header", header); List<?> result = fileLineIterator.getHeader(); assertEquals(ArrayList.class, result.getClass()); assertEquals("ヘッダ行1", result.get(0)); assertEquals("ヘッダ行2", result.get(1)); assertEquals("ヘッダ行3", result.get(2)); }