(#13542) Add unit test for the code shared by installer and upgrader

This patch adds tests for the share_beupdates/removes unit tests broken by the PMT install/upgrade
changes.