You may add tow more tests for the case that there are changes in the index:

	@Test
	public void testUpdateWorkingDirectoryFromIndex() throws Exception {
		CheckoutCommand co = git.checkout();
		File written = writeTrashFile("Test.txt", "3a");
		git.add().addFilepattern("Test.txt").call();
		written = writeTrashFile("Test.txt", "");
		assertEquals("", read(written));
		co.addPath("Test.txt").call();
		assertEquals("3a", read(written));
		assertEquals("c", read(new File(db.getWorkTree(), "Test2.txt")));
	}

	@Test
	public void testUpdateWorkingDirectoryFromHeadWithIndexChange()
			throws Exception {
		CheckoutCommand co = git.checkout();
		File written = writeTrashFile("Test.txt", "3a");
		git.add().addFilepattern("Test.txt").call();
		written = writeTrashFile("Test.txt", "");
		assertEquals("", read(written));
		co.addPath("Test.txt").setStartPoint("HEAD").call();
		assertEquals("3", read(written));
		assertEquals("c", read(new File(db.getWorkTree(), "Test2.txt")));
	}