void (String methodName, AssertHint assertHint, StringBuilder out) { final PsiMethodCallExpression originalMethodCall = (PsiMethodCallExpression)assertHint.getOriginalExpression(); final PsiReferenceExpression methodExpression = originalMethodCall.getMethodExpression(); final PsiExpression qualifier = methodExpression.getQualifierExpression(); if (qualifier == null) { final PsiMethod method = assertHint.getMethod(); final PsiClass containingClass = method.getContainingClass(); if (containingClass == null) { return; } final String className = containingClass.getQualifiedName(); if (className == null) { return; } if (!ImportUtils.addStaticImport(className, methodName, originalMethodCall)) { // add qualifier if old call was to JUnit4 method and adding static import failed out.append(className).append("."); } } else { // apparently not statically imported, keep old qualifier in new assert call out.append(qualifier.getText()).append('.'); } }