abstract some methods in contents service tests

should allow re-use for ContentsManager subclasses

closes #7190

I don't have a ContentsManager to verify this against, so I'd like to hear from @ssanderson on this one, and we can iron out details.