Vote on Iowa justice seen as test for gay marriage