Fix misused assertTrue in unit tests

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

Fixes bug #1226374

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