Refine test helper