Fixed JUnit test failures.