Add unittest for rebootCmd