### Question:
AnnotationDefinitionFactory { public Set<ErrorLog> buildErrorLogs(Set<String> loggerNames, Method method) { return annotationExtractor.findLogErrors(method, loggerNames).stream() .map(ErrorLogFactory::newInstance) .collect(toCollection(LinkedHashSet::new)); } AnnotationDefinitionFactory(PrinterResolver printerResolver); InLog buildInLog(Set<String> loggerNames, Method method); List<ParameterLog> buildParameterLogs(Set<String> loggerNames, Method method); OutLog buildOutLog(Set<String> loggerNames, Method method); Set<ErrorLog> buildErrorLogs(Set<String> loggerNames, Method method); Set<ParameterMdc> buildMethodParameterMdcs(Method method); List<Set<ParameterMdc>> buildParameterMdcs(Method method);  }### Answer:
@Test public void buildErrorLogs() throws NoSuchMethodException { Set<String> loggerNames = singleton(""); Method method = LogErrorLoggableClass.class.getDeclaredMethod("logError"); Set<ErrorLog> errorLogs = annotationDefinitionFactory.buildErrorLogs(loggerNames, method); assertThat(errorLogs, hasSize(2)); Iterator<ErrorLog> iterator = errorLogs.iterator(); assertThat(iterator.next().getLevel(), is(WARN)); assertThat(iterator.next().getLevel(), is(INFO)); }
@Test public void buildErrorLogsEmpty() throws NoSuchMethodException { Set<String> loggerNames = singleton(""); Method method = LogErrorLoggableClass.class.getDeclaredMethod("empty"); Set<ErrorLog> errorLogs = annotationDefinitionFactory.buildErrorLogs(loggerNames, method); assertThat(errorLogs, is(empty())); }