Added a comprehensive test for the whole failure recovery component of
the code and corrected a bug on the removal of resources