@Test
public void testCheckingOutLocalllyDeletedFiles() throws JavaGitException, IOException {

    List<File> filePaths = new ArrayList<File>();
    File tmpFile;
    try {
        filePaths.add(tmpFile = new File(repositoryPath + File.separator + "foobar01"));
        if (!tmpFile.exists()) {
            System.out.println("tmpFile does not exit: " + tmpFile.getPath());
        }
        if (tmpFile.delete()) { // locally delete the file
            // check out the file from the repository after deletion
            GitCheckoutResponse response = gitCheckout.checkout(repositoryDirectory, filePaths);
            File checkedOutFile = new File(repositoryPath + File.separator + "foobar01");
            assertTrue(checkedOutFile.exists());
            FileUtilities.modifyFileContents(file2, "Test for append to a file");
            GitCheckoutOptions options = new GitCheckoutOptions();
            Ref branch = Ref.createBranchRef("master");
            response = gitCheckout.checkout(repositoryDirectory, options, branch);
            assertEquals("Modified File exists", 1, response.getNumberOfModifiedFiles());
        } else {
            fail("File delete failed");
        }
    } catch (IOException e) {
        System.err.println(e.getMessage());
        e.printStackTrace();
    }

}