0

Class A

{ public String name (String str) { try { fullName = str + "org"; } catch (Exception e) { logger.debug(e.getMessage()) } } } 
2
  • 1
    Does this answer your question? Mockito How to mock and assert a thrown exception? Commented Feb 9, 2022 at 11:12
  • and this code can't be compiled, and in case you declared fullName somewhere, the code fullName = str + "org" won't throw any exception :)) Commented Feb 10, 2022 at 12:50

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.