Fix misused assertTrue in unit tests

Refactored unit tests to use assertEqual instead of assertTrue
where needed.

Fixes bug #1226374

Change-Id: Ie034536127b13653040e2beaa7247c2ecd13f4f0
Merge "Fix misused assertTrue in unit tests"