test for characteristics_by_sample and updated test for factorvalues_by_investigation