Add unit tests for model methods