1. Uncomment changes commented out during sync to mainline.
2. Fix compilation issues in agent UT code introduced because of sync to mainline