Add update plan in plan model, improve test