unit tests for Util

Moar test cases. 100% coverage of Util together with the system tests.