Add unit tests for utils