Added unit tests for util.c