Fix failures in unit tests that blocked the gate

Change-Id: I0ea296c413dcaaf251ad3a17e8d55bd6e6c8dba8
Merge "Fix failures in unit tests that blocked the gate"