private void prepareCacheEntry() {
IndexDiffCache indexDiffCache = Activator.getDefault()
.getIndexDiffCache();
// This call should trigger an indexDiffChanged event
IndexDiffCacheEntry cacheEntry = indexDiffCache
.getIndexDiffCacheEntry(repository);
listenerCalled = new AtomicBoolean(false);
indexDiffDataResult = new AtomicReference<IndexDiffData>(
null);
cacheEntry.addIndexDiffChangedListener(new IndexDiffChangedListener() {
public void indexDiffChanged(Repository repo,
IndexDiffData indexDiffData) {
listenerCalled.set(true);
indexDiffDataResult.set(indexDiffData);
}