JUnit 4.0 introduces a completely different API to the older versions. JUnit 4.0 uses Java 5.0 annotations to describe tests instead of using inheritence. It introduces more flexible initialization and cleanup, timeouts, and parameterized test cases. This post describes the new features in JUnit 4.0, and in the end, I show a basic example that …