jUnit tests refactoring