unit test for Functions