Use the proper assert methods of the mock objects. Squashed with Icc2c4095b78ef4dba091fc6792f0a38de1fda267 so we can merge this change. Change-Id: I8474b6a5cef1133fa6cb36bf08962113c6d908dc