-3

i am new in unit testing. please help me how to write a test cases for protected method using Junit and easy mock .

ErSyyedS
  • 230
  • 5
  • 9

1 Answers1

2

You could keep the same package name for your test class as that of the class under test. That way if your class under test say MyClass.java is in src directory with package name com.abc.mypackage then you your test class say MyClassTest.java could be in test directory with same package name. See image below:

enter image description here

Kuldeep Jain
  • 8,409
  • 8
  • 48
  • 73