Fixed all the JUnit tests.