### Question:
FileIterator implements RelationalInput { protected List<String> generateHeaderLine() { List<String> headerList = new ArrayList<String>(); for (Integer i = 1; i <= this.numberOfColumns; i++) { headerList.add(DEFAULT_HEADER_STRING + i.toString()); } return Collections.unmodifiableList(headerList); } FileIterator(String relationName, Reader reader, ConfigurationSettingFileInput setting); @Override boolean hasNext(); @Override List<String> next(); @Override void close(); @Override int numberOfColumns(); @Override String relationName(); @Override List<String> columnNames(); int getNumberOfSkippedDifferingLines(); static final boolean DEFAULT_HAS_HEADER; static final boolean DEFAULT_SKIP_DIFFERING_LINES; static final String DEFAULT_NULL_VALUE; }### Answer:
@Test public void testGenerateHeaderLine() throws InputIterationException, InputGenerationException { CsvFileOneLineFixture fixtureSeparator = new CsvFileOneLineFixture(';'); FileIterator csvFileWithHeader = fixtureSeparator.getTestData(); FileIterator csvFileWithoutHeader = fixtureSeparator.getTestDataWithoutHeader(); assertEquals(fixture.getExpectedColumnNames(), csvFileWithHeader.columnNames()); assertEquals(fixture.getExpectedDefaultColumnNames(), csvFileWithoutHeader.columnNames()); assertEquals(fixture.getExpectedStrings(), csvFileWithoutHeader.next()); }