Add Unit test of TaskRegistration