void (String classFqn, String replacementText) { myFixture.addClass("package " + StringUtil.getPackageName(classFqn) + ";" + "public class " + StringUtil.getShortName(classFqn) + " {}"); myFixture.configureByText("Testing.java", "public class Testing {" + " " + classFqn + " name = " + "<warning descr=\"Please use '" + replacementText + "' instead\">" + "new " + classFqn + "()" + "</warning>;" + " public void method() {" + "<warning descr=\"Please use '" + replacementText + "' instead\">" + "new " + classFqn + "()" + "</warning>;" + " }" + "}"); myFixture.testHighlighting(); }