CondenserUtils { public static List<String> extractLinksFromContent(String content) { List<String> containedUrls = new ArrayList<>(); Pattern pattern = Pattern.compile( "\\b((https?|ftp|file): Pattern.CASE_INSENSITIVE); Matcher urlMatcher = pattern.matcher(content); while (urlMatcher.find()) { containedUrls.add(content.substring(urlMatcher.start(0), urlMatcher.end(0))); } return containedUrls; } private  CondenserUtils(); static List<String> extractLinksFromContent(String content); static List<String> extractUsersFromContent(String content); static String generateSteemitMetadata(String content, String[] tags, String app, String format,
            Map<String, Object> extraMetadata); static String createPermlinkString(String title);  }
@SuppressWarnings("unchecked") @Test public void testExtractLinksFromContent() { List<String> extractedUrls = CondenserUtils.extractLinksFromContent(DUMMY_TEXT_LINKS); assertThat(extractedUrls, contains(equalTo("https: }