Add unit tests for register module