Add test for #register()