Fix misused assertTrue in unit tests

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

Fixes bug #1226374

Change-Id: I87308eb7871a55ef0fc49ca466311ed202b62d47