simplify code of singleHandler test code