Resampling tests and docs.