Warning fixes for TestCpp. Using lambda, CC_CALLBACK_1 and clone pattern.
Adding resource for ComponentTest.