adds tests for set_cpd and get_cpd