fix bug, revert test case. refactoring introduced an error in the code. code was not waiting for promise on doRevert(originalDoc) to update the working set.