### Question:
AnnotationDefinitionFactory { public Set<ParameterMdc> buildMethodParameterMdcs(Method method) { return annotationExtractor.getMdcs(method).stream() .map(ParameterMdcFactory::newInstance) .collect(toSet()); } 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 buildMethodParameterMdcs() throws NoSuchMethodException { Method method = MdcLoggableClass.class.getDeclaredMethod("mdc", String.class, String.class); Set<ParameterMdc> parameterMdcs = annotationDefinitionFactory.buildMethodParameterMdcs(method); assertThat(parameterMdcs, hasSize(1)); assertThat(parameterMdcs.iterator().next().getKey(), is("method")); }
@Test public void buildMethodParameterMdcsEmpty() throws NoSuchMethodException { Method method = MdcLoggableClass.class.getDeclaredMethod("empty"); Set<ParameterMdc> parameterMdcs = annotationDefinitionFactory.buildMethodParameterMdcs(method); assertThat(parameterMdcs, is(empty())); }