### Question:
CsvEmitter implements RecordEmitter { @Override public void endRecord() throws IOException { lineBuffer.append(LINE_DELIMITER); flushBuffer(); firstLine = false; firstCell = true; columnIndex = 0; } CsvEmitter(OutputStream stream, String path, CsvConfiguration config); @Override void emit(BooleanOption option); @Override void emit(ByteOption option); @Override void emit(ShortOption option); @Override void emit(IntOption option); @Override void emit(LongOption option); @Override void emit(FloatOption option); @Override void emit(DoubleOption option); @Override void emit(DecimalOption option); @Override void emit(StringOption option); @Override void emit(DateOption option); @Override void emit(DateTimeOption option); @Override void endRecord(); @Override void flush(); @Override void close();  }### Answer:
@Test public void empty_with_header() throws Exception { headers = Arrays.asList("key", "value"); try (CsvEmitter emitter = createEmitter()) { } headers = Arrays.asList(); try (CsvParser parser = createParser()) { assertThat(parser.next(), is(true)); assertThat(fill(parser, new StringOption()), is(new StringOption("key"))); assertThat(fill(parser, new StringOption()), is(new StringOption("value"))); parser.endRecord(); assertThat(parser.next(), is(false)); } }