Tip:
Highlight text to annotate it
X
JUnit using Eclipse.
Make a new Java project and create MyClass.java inside proves package ( you have to create it too)
Put the content code showed in the class, that includes a method
Create a Java Unit Case called MyClassTest and add the JUnit library
Insert on this the code showed, that includes the test with the waited result and what to do after and before.
Run the test
If you pay attention to JUnit view, you can see that there are a fail
So, let's correct the error
When it's ok, the color change to green
Now, add a Test Suite
Try it again running the project for see JUnit results