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