Added tests for lib/util.js