How do you write JUnit 4 test cases?

How to write test cases in JUnit 4 ?

The following are the steps of writing JUnit test cases:

  1. Project planning
  2. Create a Java class.
  3. Create a JUnit test.
  4. Run your test in Eclipse.

Visit this page for additional information.