Add unit tests for utility functions.