Use getName() method on dependency so as to pass a string