### Question:
AnnotationExtractor { public Set<Mdc> getMdcs(Method method) { return findAnnotationOnMethodOrBridge(method, Mdc.class); } 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 getMdcs() throws NoSuchMethodException { Method loggedOverriddenMethod = AnnotatedChild.class.getMethod("loggedOverriddenMethod", String.class); Method overriddenMethod = AnnotatedChild.class.getMethod("overriddenMethod", String.class); Method overriddenNotGenericMethod = AnnotatedChild.class.getMethod("overriddenNotGenericMethod", String.class); Set<Mdc> mdcs = annotationExtractor.getMdcs(loggedOverriddenMethod); Set<Mdc> bridgedMdcs = annotationExtractor.getMdcs(overriddenMethod); Set<Mdc> overriddenMdcs = annotationExtractor.getMdcs(overriddenNotGenericMethod); assertThat(mdcs, hasSize(1)); assertThat(mdcs.iterator().next().key(), isEmptyString()); assertThat(bridgedMdcs, hasSize(1)); assertThat(bridgedMdcs.iterator().next().key(), is("key")); assertThat(overriddenMdcs, hasSize(1)); assertThat(overriddenMdcs.iterator().next().key(), is("key")); }