Move a helper into core_test