MarkdownUtil { public static void removeImages(@NotNull List<String> lines) { for (int i = 0; i < lines.size(); i++) { String newText = removeAllImages(lines.get(i)); lines.set(i, newText); } } private  MarkdownUtil(); static void replaceHeaders(@NotNull List<String> lines); static void removeImages(@NotNull List<String> lines); static void replaceCodeBlock(@NotNull List<String> lines); static void generateLists(@NotNull List<String> lines);  }
@Test public void testRemoveImage() throws Exception { List<String> markdown = Arrays.asList( "![logo](http: "Hello, [node](http: ); MarkdownUtil.removeImages(markdown); Assert.assertEquals(Arrays.asList( "", "Hello, [node](http: ), markdown); }
@Test public void testRemoveImageEdgeCase() throws Exception { List<String> markdown = Arrays.asList("[![logo](http: MarkdownUtil.removeImages(markdown); Assert.assertEquals(Arrays.asList("[]"),markdown); }