@Override
  public ManageSnapshots replaceBranch(String name, long snapshotId) {
    updateSnapshotReferencesOperation().replaceBranch(name, snapshotId);
    return this;
  }
@TestTemplate
  public void testReplaceBranch() {
    table.newAppend().appendFile(FILE_A).set("wap.id", "123").stageOnly().commit();
    Snapshot firstSnapshot = Iterables.getOnlyElement(table.snapshots());
    table.manageSnapshots().createBranch("branch1", firstSnapshot.snapshotId()).commit();
    table.newAppend().appendFile(FILE_B).set("wap.id", "456").stageOnly().commit();
    Snapshot secondSnapshot = Iterables.get(table.snapshots(), 1);
    table.manageSnapshots().createBranch("branch2", secondSnapshot.snapshotId()).commit();
    table.manageSnapshots().replaceBranch("branch1", "branch2").commit();
    assertThat(secondSnapshot.snapshotId())
        .isEqualTo(table.ops().refresh().ref("branch1").snapshotId());
  }