update example objects for caret 6.0+ and add tests
reorganize for testthat compatibility