Junit test refactoring