Bug-87: unit tests for utils - part 1
Merge pull request #29 from john-hu/bug-87-unit-test-utils-part-1

Bug-87: unit tests for utils - part 1, r=thomas.