utility function and unit test for training and tuning random forest models
using the caret library