Add a test for register