cuspymd commented on a change in pull request #4079:
URL: https://github.com/apache/zeppelin/pull/4079#discussion_r606168837



##########
File path: 
zeppelin-server/src/test/java/org/apache/zeppelin/rest/NotebookRestApiTest.java
##########
@@ -78,6 +78,39 @@ public void setUp() {
     anonymous = new AuthenticationInfo("anonymous");
   }
 
+  @Test
+  public void testGetReloadNote() throws IOException {
+    LOG.info("Running testGetNote");
+    Note note1 = null;
+    try {
+      note1 = TestUtils.getInstance(Notebook.class).createNote("note1", 
anonymous);
+      note1.addNewParagraph(AuthenticationInfo.ANONYMOUS);
+      TestUtils.getInstance(Notebook.class).saveNote(note1, anonymous);
+      CloseableHttpResponse get = httpGet("/notebook/" + note1.getId());
+      assertThat(get, isAllowed());
+      Map<String, Object> resp = 
gson.fromJson(EntityUtils.toString(get.getEntity(), StandardCharsets.UTF_8),
+              new TypeToken<Map<String, Object>>() {}.getType());

Review comment:
       It is repeated in all tests, and it would be good to separate it into a 
function later.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to