Adding tests for register method