DependencyGraphImpl implements DependencyGraph { static String methodName(Method m) { return m.getDeclaringClass().getName() + "#" + m.getName() + "(" + Stream.of(m.getParameterTypes()) .map(Class::getSimpleName) .collect(joining(", ")) + ")"; } DependencyGraphImpl(Function<Class<?>, InjectorProxy> proxyFunction); @Override DependencyNode get(Class<?> clazz); @Override DependencyNode getOrCreate(Class<?> clazz); @Override Optional<DependencyNode> getIfPresent(Class<?> clazz); @Override DependencyGraph inject(); @Override Stream<DependencyNode> nodes();  }
@Test void methodName() throws NoSuchMethodException { final String name = "execute"; final String methodName = DependencyGraphImpl.methodName(Foo.class.getDeclaredMethod(name)); assertTrue(methodName.contains(Foo.class.getName())); assertTrue(methodName.contains(name)); }