Merge "Add missing error checks in tests." am: 7771604bd2 am: 82ddfc299e
am: a88c1df41c

Change-Id: I406e2ba97faf5784c2516274467a9d3e8b1d6d6b