added docker recovery test and made some refactoring to persistence test