Fix misused assertTrue in unit tests

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

Fixes bug #1226374

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