Fix misused assertTrue in unit tests

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

Fixes bug #1226374

Change-Id: I678b2e7fcc522c8776c7fc0a554c1fc229ab781e