Added tests for preprocess functionality