Add unit tests for module functions