Create test.cpp

added example