test: extract common schema definition code