This might be a conceptually stupid question, but it also might not and since I am still a student I think I should I have no problem asking.
Imagine you have a method that if given certain conditions it will throw an NumberFormatException. I want to write a Unit Test to see if the exception is being correctly thorwn. How can I achieve this?
P.S. I am using JUnit to write the Unit Tests.
Thanks.