Answers

Question and Answer:

  Home  JUnit

⟩ How Do You Test a protected Method?

When a method is declared as "protected", it can only be accessed within the same package where the class is defined.

In order to test a "protected" method of a target class, you need to define your test class in the same package as the target class.

 170 views

More Questions for you: