Tighten up equality checks in tests