void () { assertPackageDetected("package p; \n" + "class A {}", "p"); assertPackageDetected("package p; \n" + "import java.util.Set;" + "class A {}", "p"); assertPackageDetected("class A {}", ""); assertPackageDetected("import java.util.*;\n" + "class A {}", ""); assertPackageDetected("invalid", null); }