Fixed JUnit tests