Added tests for util functions.