Fixed test issues on stat_factory. [#56405906]