@Override
  public Revision checkpoint(String noteId,
                             String notePath,
                             String commitMessage,
                             AuthenticationInfo subject) throws IOException {
    Revision revision = super.checkpoint(noteId, notePath, commitMessage, subject);

    updateRemoteStream();

    return revision;
  }
@Test
  /**
   * Test the case when the check-pointing (add new files and commit) it pushes the local commits to the remote
   * repository
   */
  void pushLocalChangesToRemoteRepositoryOnCheckpointing() throws IOException, GitAPIException {
    // Add a new paragraph to the local repository
    addParagraphToNotebook();

    // Commit and push the changes to remote repository
    NotebookRepoWithVersionControl.Revision secondCommitRevision = gitHubNotebookRepo.checkpoint(
            TEST_NOTE_ID, TEST_NOTE_PATH, "Second commit from local repository", null);

    // Check all the commits as seen from the remote repository. The commits are ordered chronologically. The last
    // commit is the first in the commit logs.
    Iterator<RevCommit> revisions = remoteGit.log().all().call().iterator();

    assert(secondCommitRevision.id.equals(revisions.next().getName())); // The local commit after adding the paragraph

    // The first commit done on the remote repository
    assert(firstCommitRevision.getName().equals(revisions.next().getName()));
  }