remove unnecessary error check
simplify test assertion