Revert "Revert "model unit tests""

This reverts commit 7c1d34ec0bbe230876a28e33f1012c076926536f.