void (String text) { getFixture().configureByText("a.groovy", "def builder = new groovy.json.StreamingJsonBuilder(); " + DefaultGroovyMethods.invokeMethod(String.class, "valueOf", new Object[]{text})); GrReferenceExpression reference = (GrReferenceExpression)getFixture().getReferenceAtCaretPosition(); assert reference.resolve() instanceof PsiMethod && reference.getType().getCanonicalText().equals("java.lang.Object") : text; }