Refactors the _clearSchema testing helper.