Reorganize unit test helpers to make the more re-usable