junit cleanup and refactoring