0

Class A

{
    public String name (String str)
    {
        try {
            fullName = str + "org";
        } catch (Exception e) {
            logger.debug(e.getMessage())
        }
    }


}
VedantK
  • 9,728
  • 7
  • 66
  • 71
Maujood
  • 1
  • 1
  • 5
  • 1
    Does this answer your question? [Mockito How to mock and assert a thrown exception?](https://stackoverflow.com/questions/16243580/mockito-how-to-mock-and-assert-a-thrown-exception) – VedantK Feb 09 '22 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 :)) –  Feb 10 '22 at 12:50

0 Answers0