### Question:
PermalinkControllerImpl implements PermalinkController { @Override public InputStream downloadFile(String fileUrl, HttpServer server) throws IOException, URISyntaxException { FileDownloader downloader = new FileDownloader(server, fileUrl); return downloader.downloadFile(); } PermalinkControllerImpl(ServerListManager serverListManager, ServerSourceControllerManager controllerManager); @Override InputStream downloadFile(String fileUrl, HttpServer server); @Override String getPermalinkUrl(String host); @Override String uploadFile(FilePayload payload, HttpServer server);  }### Answer:
@Test public void testDownloadStateFile() throws IOException, URISyntaxException { EasyMockSupport support = new EasyMockSupport(); ServerListManager serverListManager = support.createMock(ServerListManager.class); ServerSourceControllerManager controllerManager = support.createMock(ServerSourceControllerManager.class); HttpServer server = createServerForDownload(support); support.replayAll(); PermalinkControllerImpl permalinker = new PermalinkControllerImpl(serverListManager, controllerManager); InputStream stream = permalinker.downloadFile(ourFullDownloadURL, server); assertNotNull(stream); support.verifyAll(); }