Remove repetition and make preprocess tests more readable.
Merge pull request #288 from jpbackman/refactor-preprocess-test

Remove repetition and make preprocess tests more readable.