unittest for utility functions.