Add unit test for model/upgrade.