Fix misused assertTrue in unit tests

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

Fixes bug #1226374

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