### Question:
ImagePathReplacer { public String replaceContent() { String newContent; Matcher matcher = pattern.matcher(originalContent); newContent = matcher.replaceAll("$1" + getUrl() + "$2$3"); return newContent; } ImagePathReplacer(String originalContent, String appId); String replaceContent();  }### Answer:
@Test public void testRegexReplacement() { String newContent = new ImagePathReplacer(TEST_CONTENT, appId).replaceContent(); assertEquals(TEST_CONTENT_REPLACED, newContent); }