### Question:
GeogigTransaction extends DelegatingContext implements Context { public void commit() throws ConflictsException { commit(DefaultProgressListener.NULL); } GeogigTransaction(Context context, UUID transactionId); static String buildTransactionNamespace(final UUID transactionId); void create(); void close(); GeogigTransaction setAuthor(@Nullable String authorName, @Nullable String authorEmail); UUID getTransactionId(); @Override WorkingTree workingTree(); @Override StagingArea stagingArea(); @Override RefDatabase refDatabase(); @Override String toString(); void commit(); void commit(ProgressListener listener); void commitSyncTransaction(); void commitSyncTransaction(ProgressListener listener); void abort(); @Override ConflictsDatabase conflictsDatabase(); @Override BlobStore blobStore(); List<RefChange> changedRefs(); @Override Context snapshot();  }### Answer:
@Test public void testCommitUpdatesRemoteRefs() throws Exception { insertAndAdd(points1); RevCommit headCommit = repo.command(CommitOp.class).call(); final String remoteRef = "refs/remotes/upstream/master"; final String unchangedRemoteRef = "refs/remotes/upstream/testbranch"; Ref remoteHead = repo.command(UpdateRef.class).setName(remoteRef) .setNewValue(headCommit.getId()).setReason("test init").call().get(); assertEquals(headCommit.getId(), remoteHead.getObjectId()); repo.command(UpdateRef.class).setName(unchangedRemoteRef).setNewValue(headCommit.getId()) .setReason("test init").call().get(); GeogigTransaction tx = repo.command(TransactionBegin.class).call(); insertAndAdd(tx, points2); RevCommit newcommit = tx.command(CommitOp.class).call(); Ref txRemoteHead = tx.command(UpdateRef.class).setName(remoteRef) .setNewValue(newcommit.getId()).setReason("test init").call().get(); assertEquals(newcommit.getId(), txRemoteHead.getObjectId()); tx.commit(); txRemoteHead = repo.command(RefParse.class).setName(remoteRef).call().get(); assertEquals(newcommit.getId(), txRemoteHead.getObjectId()); txRemoteHead = repo.command(RefParse.class).setName(unchangedRemoteRef).call().get(); assertEquals(headCommit.getId(), txRemoteHead.getObjectId()); }