originMaster.setNewObjectId(commit1);
originMaster.forceUpdate();
RemoteConfig config = new RemoteConfig(repo.getConfig(),
Constants.DEFAULT_REMOTE_NAME);
config.addURI(new URIish(repo2.toURI().toString()));
config.update(repo.getConfig());
Collection<RefDiff> diffs = RepositoryUtils.diffOriginRefs(repo);
assertNotNull(diffs);
assertFalse(diffs.isEmpty());
assertNotNull(diffs.iterator().next().getLocal());
assertNotNull(diffs.iterator().next().getRemote());