Fixes for running tests on 1.8.7.
Revert "Fixes for running tests on 1.8.7."

This reverts commit 8b05203b17671a92c0bc4a1f2a8453416c2d618a.
Fixes for running tests on 1.8.7.