### Question:
AnnotationExtractor { Log findLog(Method method, Set<String> loggers) { return filterAndFindFirstAnnotation(getLogs(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 findLog() throws NoSuchMethodException { Method method = MultiLogger.class.getDeclaredMethod("log"); Method loggerMethod = MultiLogger.class.getDeclaredMethod("loggerLog"); Set<String> loggerNames = new HashSet<>(asList("", "logger")); Set<String> unknownLoggerNames = singleton("b"); Log log = annotationExtractor.findLog(method, loggerNames); Log loggerLog = annotationExtractor.findLog(loggerMethod, loggerNames); Log notFoundLog = annotationExtractor.findLog(method, unknownLoggerNames); assertThat(log, notNullValue()); assertThat(loggerLog, notNullValue()); assertThat(notFoundLog, nullValue()); }