You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As JUnit is interacting with a test class by reflection anyway, there's absolutely no need to insist on @Rule fields to be declared as public. Neither that's the case for setup methods or test methods in general.
A framework interacting with the developer's types by reflection shouldn't impose visibility rules to standard type components like fields or methods unless absolutely necessary. Right now I find myself having to add public virtually everywhere with the only effect of losing control of visibilities in my code.