That test here is ok. But please add a copy of this test and this time add here the following lines:

		writeTrashFile("file2", "more changess");
		git.add().addFilepattern("file2").call();
		git.commit().setMessage("update file2 on target")
				.call();

This will remove the possibility to fast-forward. The rebase algorithm now has to cherry-pick every single missing commit. But we cannot cherry-pick merge commits. In my eyes the rebase command know should return with an error that it cannot cherry-pick merge-commits. But it is not doing so.