unit tests for model