Replace assertTrue by assertEquals when necessary