JUnit tests improvement