@GET
  @Path("{noteId}/revision")
  @ZeppelinApi
  public Response getNoteRevisionHistory(@PathParam("noteId") String noteId) throws IOException {
    LOGGER.info("Get revision history of note {}", noteId);
    List<NotebookRepoWithVersionControl.Revision> revisions = notebookService.listRevisionHistory(noteId, getServiceContext(), new RestServiceCallback<>());
    return new JsonResponse<>(Status.OK, revisions).build();
  }
@Test
  void testGetNoteRevisionHistory() throws IOException {
    LOG.info("Running testGetNoteRevisionHistory");
    String note1Id = null;
    try {
      String notePath = "note1";
      note1Id = notebook.createNote(notePath, anonymous);

      //Add a paragraph and commit
      NotebookRepoWithVersionControl.Revision first_commit =
              notebook.processNote(note1Id, note -> {
                Paragraph p1 = note.addNewParagraph(anonymous);
                p1.setText("text1");
                notebook.saveNote(note, AuthenticationInfo.ANONYMOUS);
                return notebook.checkpointNote(note.getId(), note.getPath(), "first commit", anonymous);
              });

      //Add a paragraph again
      notebook.processNote(note1Id, note -> {
        Paragraph p2 = note.addNewParagraph(anonymous);
        p2.setText("text2");
        notebook.saveNote(note, AuthenticationInfo.ANONYMOUS);
        return null;
      });

      // Verify
      CloseableHttpResponse get1 = httpGet("/notebook/" + note1Id + "/revision");

      assertThat(get1, isAllowed());
      Map<String, Object> resp = gson.fromJson(EntityUtils.toString(get1.getEntity(), StandardCharsets.UTF_8),
              new TypeToken<Map<String, Object>>() {
              }.getType());
      List<Map<String, Object>> body = (List<Map<String, Object>>) resp.get("body");
      assertEquals(1, body.size());
      assertEquals(first_commit.id, body.get(0).get("id"));
      get1.close();

      // Second commit
      NotebookRepoWithVersionControl.Revision second_commit = notebook.processNote(note1Id, note -> notebook.checkpointNote(note.getId(), note.getPath(), "Second commit", anonymous));

      // Verify
      CloseableHttpResponse get2 = httpGet("/notebook/" + note1Id + "/revision");

      assertThat(get2, isAllowed());
      resp = gson.fromJson(EntityUtils.toString(get2.getEntity(), StandardCharsets.UTF_8),
              new TypeToken<Map<String, Object>>() {
              }.getType());
      body = (List<Map<String, Object>>) resp.get("body");
      assertEquals(2, body.size());
      assertEquals(second_commit.id, body.get(0).get("id"));
      get2.close();

    } finally {
      // cleanup
      if (null != note1Id) {
        notebook.removeNote(note1Id, anonymous);
      }
    }
  }