Issue #1: Refactoring test code