Card origin_node_401 - Fix extended tests

* Refactor gear functional tests
* Refactor upgrade functional tests