Refactor tests, ensure existing order is preserved in failure cases