Simplify test function