void () { doTest("class X {" + " void x(I i) {" + " switch (i) {" + " case I ii when Math.random() > 0.5:" + " break;" + " case C1 c1:" + " break;" + " case C2 c1:" + " break;" + " /*'default' branch is unnecessary*/default/*_*//**/:" + " break;" + " }" + " }" + "}"); checkQuickFix("Remove 'default' branch", "class X {" + " void x(I i) {" + " switch (i) {" + " case I ii when Math.random() > 0.5:" + " break;" + " case C1 c1:" + " break;" + " case C2 c1:" + " break;\n" + "}" + " }" + "}"); }