If test errors then an error is thrown.