Update test.cpp

Refactoring =)