load: deduplicate unittest code, no functional changes