FileWriter extends AbstractFormatPatternWriter { @Override public void close() throws IOException { writer.close(); } FileWriter();  FileWriter(final Map<String, String> properties); @Override void write(final LogEntry logEntry); @Override void flush(); @Override void close();  }
@Test public void invalidCharset() throws IOException { String file = FileSystem.createTemporaryFile(); new FileWriter(doubletonMap("file", file, "charset", "UTF-42")).close(); assertThat(systemStream.consumeErrorOutput()).containsOnlyOnce("ERROR").containsOnlyOnce("charset").containsOnlyOnce("UTF-42"); }