In the interests of keeping the code DRY, wouldn't it be better to have a general function here that you then instantiate for each of these tests - or should all tests be independent and encapsulated?