Dbatiste/refactor test helper