[PATCH 1/3] riched20: Move test class creation to a helper function