### Question:
DavHandler { public void saveLogs(String service, String evalId, List<String> logs) throws HttpException, IOException { String baseUrl = getFolderHierarchyUrl(); String serviceUrl = createFolder(baseUrl, service); if (!evalId.equals("")){ serviceUrl = createFolder(serviceUrl, evalId); } String logUrl = createFolder(serviceUrl, "log"); int i = 1; for (String log : logs) { String targetFileName = format(i) + ".log"; saveText(log, logUrl + separator + targetFileName); i++; } } DavHandler(List<String> folderHierarchy); void saveLogs(String service, String evalId, List<String> logs); void saveText(String text, String url); void saveStream(InputStream stream, String url); void saveFiles(UrlParts urlParts, ToolResults urls); String getFolderHierarchyUrl(); String retrieveTextFile(String url); Set<String> getFileEndings();  }### Answer:
@Test public void testSaveLogs() throws HttpException, IOException { DavHandler dav = new DavHandler(folders); List<String> logs = Arrays.asList(new String[] { "log1", "log2" }); dav.saveLogs("myservice", "myevalid", logs); InputStream log1 = new URL( "http: .openStream(); new URL( "http: .openStream(); String log1String = IOUtils.toString(log1); assertEquals("log1", log1String); }