writeTrashFile("target", "someData");
FileUtils.createSymLink(new File(db.getWorkTree(), "tlink"), "target");
git.add().addFilepattern("target").addFilepattern("tlink").call();
git.commit().setMessage("add target").call();
assertEquals(4, db.getWorkTree().list().length); // self-check
git.checkout().setName(base.name()).call();
assertEquals(2, db.getWorkTree().list().length); // self-check
git.checkout().setName("master").call();
assertEquals(4, db.getWorkTree().list().length);
String data = read(new File(db.getWorkTree(), "target"));
assertEquals(8, new File(db.getWorkTree(), "target").length());