add unittest for restart