### Question:
AnnotationExtractor { List<Log> findParameterLogs(Method method, Set<String> loggers) { return getParameterLogs(method).stream() .map(logs -> filterAndFindFirstAnnotation(logs, loggers)) .collect(toList()); } 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 findParameterLogs() throws NoSuchMethodException { Method method = MultiLogger.class.getDeclaredMethod("parameterLogs", String.class); Method loggerMethod = MultiLogger.class.getDeclaredMethod("loggerParameterLogs", String.class); Set<String> loggerNames = new HashSet<>(asList("", "logger")); Set<String> unknownLoggerNames = singleton("b"); List<Log> parameterLogs = annotationExtractor.findParameterLogs(method, loggerNames); List<Log> loggerParameterLogs = annotationExtractor.findParameterLogs(loggerMethod, loggerNames); List<Log> notFoundParameterLogs = annotationExtractor.findParameterLogs(method, unknownLoggerNames); assertThat(parameterLogs, hasSize(1)); assertThat(parameterLogs.get(0), notNullValue()); assertThat(loggerParameterLogs, hasSize(1)); assertThat(loggerParameterLogs.get(0), notNullValue()); assertThat(notFoundParameterLogs, hasSize(1)); assertThat(notFoundParameterLogs.get(0), nullValue()); }