Extracted repository dumping logic into separate class and tested it