@Test
public void testClone() throws Throwable {

    testdir.ensureEmpty();
    File repodir = testdir.getFile("repo");
    FS.ensureDirExists(repodir);
    InternalGit repo = new InternalGit(repodir, new GitMirrors());
    Assert.assertThat("repo.exist()", repo.exists(), is(false));
    String url = "http://joakim.erdfelt.com/git/clone-empty-jar.git";
    repo.setMonitor(new TerseProgressMonitor());
    repo.clone(url);
    Assert.assertThat("repo.getCurrentBranch()", repo.getCurrentBranch(), is("refs/heads/master"));
}