Enhance unit test for prepare update framework