JUnit in version 4.x is a test framework which uses annotations to identify methods that specify a test.
Typically a JUnit test is a method contained in a class which is only used for testing. This is called a Test class.
To write a test with the JUnit 4.x framework you annotate a method with the @org.junit.Test annotation.
In this method you use a method provided by the JUnit framework to check the expected result of the code execution versus the actual result.
For an example regarding JUnit Test go through below link..http://www.vogella.com/tutorials/JUnit/article.html
2
solved Want to Know the Use of Android JUnit Test in eclipse? [closed]