some refactoring in unit testing code