seems like a lot of duplication in these tests ... perhaps a helper function or fixture?