In eclipse:
How can I know the version of JUnit
If you are cloned existing maven project and you want to check on which version your tests will run then you can check Junit version in you pom.xml file.
If you print your junit version from code then it will print from your maven repository i.e. the version present in your pom.xml
import junit.runner.Version;
System.out.println("Version="+Version.id());