Created a test for setChecked function