Fixing JUnit tests