Test classes and methods must be public.
However they are generally not published.
Put the tests in a separate package, and don't include that package when producing JavaDoc.