Test cases for utils.