[task] refactor update Extension and adding some unit tests