should work with more than two backups now
Move common code from tests to library
make sure it works with more than two backups