testUtils.addFileToProject(project.getProject(), "file2.txt",
"some more text");
AddToIndexOperation addToIndexOperation = new AddToIndexOperation(
new IResource[] { project.getProject().getFile("file.txt"),
project.getProject().getFile("file2.txt") });
addToIndexOperation.execute(null);
// Validate pre-conditions
DirCache dirCache = DirCache.read(repository.getIndexFile(),
FS.DETECTED);
assertEquals(2, dirCache.getEntryCount());