LogcatWriter implements Writer { @Override public Collection<LogEntryValue> getRequiredLogEntryValues() { Collection<LogEntryValue> values = EnumSet.of(LogEntryValue.LEVEL); values.addAll(tagToken.getRequiredLogEntryValues()); values.addAll(messageToken.getRequiredLogEntryValues()); return values; } LogcatWriter();  LogcatWriter(final Map<String, String> properties); @Override Collection<LogEntryValue> getRequiredLogEntryValues(); @Override void write(final LogEntry logEntry); @Override void flush(); @Override void close();  }
@Test public void requiredLogEntryValues() { LogcatWriter writer = new LogcatWriter(doubletonMap("tagname", "{thread}", "format", "{class}: {message}")); assertThat(writer.getRequiredLogEntryValues()) .containsOnly(LogEntryValue.LEVEL, LogEntryValue.THREAD, LogEntryValue.CLASS, LogEntryValue.MESSAGE, LogEntryValue.EXCEPTION); }