0
if(str == null){
  throw new Exception("exception occurred");
}

I'm excepting to write a unit test case for the above code.

Bala
  • 1
  • 1
  • 4
    Does this answer your question? [How do you assert that a certain exception is thrown in JUnit 4 tests?](https://stackoverflow.com/questions/156503/how-do-you-assert-that-a-certain-exception-is-thrown-in-junit-4-tests) – luk2302 Sep 20 '21 at 06:24
  • while running the test case if block coverage is not at all happening – Bala Sep 20 '21 at 06:54

0 Answers0