add object hook and testcase