Moving assserts into testing code