Modified the "injectmethod" Groovy snippet in order it behaves correctly when injecting a no argument method (Groovy).