Add tests for util.go