### Question:
AnnotationExtractor { Set<Log.error> findLogErrors(Method method, Set<String> loggers) { return filterAnnotations(getLogErrors(method), loggers); } private  AnnotationExtractor(); static AnnotationExtractor getInstance(); Set<Method> getCandidateMethods(Class<?> clazz); boolean hasAnyAnnotation(Method method); boolean hasAnyAnnotation(Parameter parameter); Set<Log> getLogs(Method method); Set<Log.in> getLogIns(Method method); Set<Log.out> getLogOuts(Method method); Set<Log.error> getLogErrors(Method method); Set<Mdc> getMdcs(Method method); List<Set<Log>> getParameterLogs(Method method); List<Set<Mdc>> getParametersMdcs(Method method);  }### Answer:
@Test public void findLogErrors() throws NoSuchMethodException { Method method = MultiLogger.class.getDeclaredMethod("logErrors"); Method loggerMethod = MultiLogger.class.getDeclaredMethod("loggerLogErrors"); Set<String> loggerNames = new HashSet<>(asList("", "logger")); Set<String> unknownLoggerNames = singleton("b"); Set<Log.error> logErrors = annotationExtractor.findLogErrors(method, loggerNames); Set<Log.error> loggerLogErrors = annotationExtractor.findLogErrors(loggerMethod, loggerNames); Set<Log.error> notFoundLogErrors = annotationExtractor.findLogErrors(method, unknownLoggerNames); assertThat(logErrors, hasSize(1)); assertThat(logErrors.iterator().next(), notNullValue()); assertThat(loggerLogErrors, hasSize(1)); assertThat(loggerLogErrors.iterator().next(), notNullValue()); assertThat(notFoundLogErrors, is(empty())); }