dry out error check in test