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