Revert 10219d6fd76becc0c896ea77b6f7d0f2013345d7
Rewrite test suite