How do you test a method in JUnit 4?
A JUnit test is a method in a class that is solely used for testing. This is referred to as a Test class. Annotate a method with the @Test annotation to indicate that it is a test method. This function runs the code that is being tested.