Refactoring test.hpp