[server][testArmBase] Consolidate the similar methods.