Fix bad comparisons in unit tests