See: eclipse-jdt/eclipse.jdt.ui#2667 (comment)
To distinguish between JUnit 5 and JUnit 6 annotations, we potentially look into manifests. PackageFragmentRoot.getManifest() is ideal for this, since its backed by the JDT core zip cache. Unfortunately the method is internal and org.eclipse.jdt.junit.core is not allowed to access it - there is a compilation error due to the access restriction; trying to suppress a warning doesn't work.