assertEquals is deprecated, use assertEqual

Also replace assert_ with more specific test predicates.

Change-Id: Ie91b1aff39a1119c456b0b76602c978531eb0025
Merge "assertEquals is deprecated, use assertEqual"