test case small refactoring