unittest case for cancel_job