Added tests for DownloadService

fixes #340