add test code in register api