Fix JUnit tests