test: extract schema definition code