TestUtil.disableProxy();
remoteRepository = new SampleTestRepository(NUMBER_RANDOM_COMMITS, true);
localRepoPath = new File(ResourcesPlugin.getWorkspace().getRoot()
.getLocation().toFile(), "test" + System.nanoTime());
String branch = Constants.R_HEADS + SampleTestRepository.FIX;
CloneOperation cloneOperation = new CloneOperation(new URIish(
remoteRepository.getUri()), true, null, localRepoPath, branch,
"origin", 30);
cloneOperation
.setCredentialsProvider(new UsernamePasswordCredentialsProvider(
"agitter", "letmein"));
cloneOperation.run(null);
file = new File(localRepoPath, SampleTestRepository.A_txt_name);
assertTrue(file.exists());
localRepository = Activator.getDefault().getRepositoryCache()
.lookupRepository(new File(localRepoPath, ".git"));
assertNotNull(localRepository);