### Question:
AnnotationDefinitionFactory { public List<Set<ParameterMdc>> buildParameterMdcs(Method method) { return annotationExtractor.getParametersMdcs(method).stream() .map(mdcs -> unmodifiableSet(mdcs.stream().map(ParameterMdcFactory::newInstance).collect(toSet()))) .collect(toList()); } AnnotationDefinitionFactory(PrinterResolver printerResolver); InLog buildInLog(Set<String> loggerNames, Method method); List<ParameterLog> buildParameterLogs(Set<String> loggerNames, Method method); OutLog buildOutLog(Set<String> loggerNames, Method method); Set<ErrorLog> buildErrorLogs(Set<String> loggerNames, Method method); Set<ParameterMdc> buildMethodParameterMdcs(Method method); List<Set<ParameterMdc>> buildParameterMdcs(Method method);  }### Answer:
@Test public void buildParameterMdcs() throws NoSuchMethodException { Method method = MdcLoggableClass.class.getDeclaredMethod("mdc", String.class, String.class); List<Set<ParameterMdc>> parameterMdcs = annotationDefinitionFactory.buildParameterMdcs(method); assertThat(parameterMdcs, hasSize(2)); assertThat(parameterMdcs.get(0), hasSize(1)); assertThat(parameterMdcs.get(0).iterator().next().getKey(), is("a")); assertThat(parameterMdcs.get(1), is(empty())); }
@Test public void buildParameterMdcsEmpty() throws NoSuchMethodException { Method method = MdcLoggableClass.class.getDeclaredMethod("empty"); List<Set<ParameterMdc>> parameterMdcs = annotationDefinitionFactory.buildParameterMdcs(method); assertThat(parameterMdcs, is(empty())); }