### Question:
ParameterNameResolver { public List<String> tryToResolve(Method method) { String[] parameterNames = parameterNameDiscoverer.getParameterNames(method); if (isNull(parameterNames)) { return nCopies(method.getParameterCount(), null); } return asList(parameterNames); }  List<String> tryToResolve(Method method);  }### Answer:
@Test public void tryToResolve() { ParameterNameDiscoverer discoverer = mock(ParameterNameDiscoverer.class); when(discoverer.getParameterNames(eq(method))).thenReturn(new String[]{"s", "i"}); parameterNameResolver.setParameterNameDiscoverer(discoverer); List<String> parameterNames = parameterNameResolver.tryToResolve(method); assertThat(parameterNames, hasSize(2)); assertThat(parameterNames.get(0), is("s")); assertThat(parameterNames.get(1), is("i")); }