public void testCloneCouchApp() throws IOException {
    File couchAppDir = generateCouchApp();
    String couchAppUrl = "http://localhost:5984/clone";
    couchAppUrl = couchAppUtil.pushCouchApp(couchAppDir, couchAppUrl);
    couchAppUrl = couchAppUrl.replace("/index.html", "");

    File tmpDir = getTmpFolder();
    URL url = new URL(couchAppUrl);
    couchAppUtil.cloneCouchApp(tmpDir, url);

    assertTrue("missing .couchapprc file", new File(tmpDir, ".couchapprc").exists());
    assertTrue("missing couchapp.json file", new File(tmpDir, "couchapp.json").exists());
    assertTrue("missing _attachments directory", new File(tmpDir, "_attachments").exists());
  }