Refactored tests to use JUnit.