IDEA-126601 Java-Cucumber can be implemented in Groovy. So replaced all JavaPsiFile usages with PsiClassOwner. Create snippet method using JavaElementFactories