simplify test code