Created new test_apply.cpp