Add tests for Function class.