added unit test coverage to backup and discovery service

could @e-schultz merge?