add test for function registration