Add test coverage for functions