PushOperation push = new PushOperation(repository2.getRepository(),
spec, false, 0);
push.run(null);
PushOperationResult result = push.getOperationResult();
PushResult pushResult = result.getPushResult(remote);
assertNotNull("Expected result to have tracking ref update", pushResult.getTrackingRefUpdate(trackingRef));
ObjectId trackingId = repository2.getRepository().resolve(trackingRef);
assertEquals("Expected tracking branch to be updated", commit.getId(), trackingId);
}