Stokes scored a century and rested Smith