Add the test case of testing with registration rule
Fix the bugs
Merge from Perforce
Merge branch 'imp/provision_ap'