refractor tests using new helper