Added unit tests for utility functions.