Warning fixes for TestCpp and adding resource for ComponentTest.