### Question:
MdcAdvisor extends AbstractAdvisor<MethodMdc> { void processParameterDefinitions(MethodInvocation invocation, MethodMdc methodMdc, Set<String> localKeys) { Object[] arguments = invocation.getArguments(); for (int a = 0; a < arguments.length; a++) { for (ParameterMdc definition : methodMdc.getParameterDefinitions().get(a)) { String key = definition.getKey(); if (key.isEmpty()) { key = methodMdc.getParameterNames().get(a); if (isNull(key)) { key = synthesizeKey(invocation.getMethod().getName(), a); } } String expressionString = definition.getExpressionString(); Object value = expressionString.isEmpty() ? arguments[a] : expressionEvaluator.evaluate(expressionString, arguments[a]); putMdc(key, value, definition, localKeys); } } } private  MdcAdvisor(List<MethodMdc> methodMdcs,
                       ExpressionEvaluator expressionEvaluator); @Override Object invoke(MethodInvocation invocation);  }### Answer:
@Test public void processParameterDefinitions() { MethodMdc methodMdc = mock(MethodMdc.class); ParameterMdc parameterMdc = givenParameterMdc("key", "value"); ParameterMdc parameterMdc1 = givenParameterMdc("key1", "value1"); when(methodMdc.getParameterDefinitions()).thenReturn(asList(new LinkedHashSet<>(asList(parameterMdc, parameterMdc1)), emptySet(), emptySet())); MdcAdvisor mdcAdvisor = MdcAdvisor.newInstance(singletonList(methodMdc), givenExpressionEvaluator("value", "value1")); assertNotNull(mdcAdvisor); MdcAdvisor mdcAdvisorStub = spy(mdcAdvisor); doNothing().when(mdcAdvisorStub).putMdc(any(), any(), any(), any()); mdcAdvisorStub.processParameterDefinitions(givenMethodInvocation("0", "1", "2"), methodMdc, localKeys); verify(mdcAdvisorStub).putMdc("key", "value", parameterMdc, localKeys); verify(mdcAdvisorStub).putMdc("key1", "value1", parameterMdc1, localKeys); }