small refactoring unit tests