TinylogLoggingConfiguration { @SuppressWarnings("unchecked") public Collection<LogEntryValue>[][] calculateRequiredLogEntryValues(final Collection<Writer>[][] writers) { Collection<LogEntryValue>[][] logEntryValues = new Collection[writers.length][Level.values().length - 1]; for (int tagIndex = 0; tagIndex < writers.length; ++tagIndex) { for (int levelIndex = 0; levelIndex < Level.OFF.ordinal(); ++levelIndex) { Set<LogEntryValue> values = EnumSet.noneOf(LogEntryValue.class); for (Writer writer : writers[tagIndex][levelIndex]) { values.addAll(writer.getRequiredLogEntryValues()); } logEntryValues[tagIndex][levelIndex] = values; } } return logEntryValues; } TinylogLoggingConfiguration(); @SuppressWarnings("unchecked") Collection<Writer>[][] createWriters(final List<String> tags, final Level minimumLevel, final boolean writingThread); Level calculateMinimumLevel(final Level globalLevel, final Map<String, Level> customLevels); @SuppressWarnings("unchecked") Collection<LogEntryValue>[][] calculateRequiredLogEntryValues(final Collection<Writer>[][] writers); BitSet calculateFullStackTraceRequirements(final Collection<LogEntryValue>[][] logEntryValues); WritingThread createWritingThread(final Collection<Writer>[][] matrix); static Collection<Writer> getAllWriters(final Collection<Writer>[][] matrix); static LogEntry createLogEntry(final StackTraceElement stackTraceElement, final String tag, 
		final Level level, final Throwable exception, final MessageFormatter formatter, final Object obj,
		final Object[] arguments, final Collection<LogEntryValue>[] requiredLogEntryValues, 
		final TinylogContextProvider contextProvider);  }
@Test @SuppressWarnings("unchecked") public void calcRequiredLogEntryValues() { TinylogLoggingConfiguration config = new TinylogLoggingConfiguration(); Collection<Writer>[][] writers = new Collection[2][Level.values().length - 1]; for (Collection<Writer>[] writer: writers) { Arrays.fill(writer, Collections.emptyList()); } writers[0][0] = Collections.singleton(new WriterOne()); writers[0][1] = Collections.singleton(new WriterTwo()); writers[1][0] = Arrays.asList(new Writer[] {new WriterOne(), new WriterTwo()}); Collection<LogEntryValue>[][] values = config.calculateRequiredLogEntryValues(writers); assertThat(values[0][0]).containsExactlyInAnyOrder(LogEntryValue.TAG, LogEntryValue.LEVEL); assertThat(values[0][1]).containsExactlyInAnyOrder(LogEntryValue.DATE, LogEntryValue.LEVEL, LogEntryValue.FILE); assertThat(values[1][0]).containsExactlyInAnyOrder(LogEntryValue.TAG, LogEntryValue.LEVEL, LogEntryValue.DATE, LogEntryValue.FILE); assertThat(values[1][1]).isEmpty(); }