### Question:
MarkwonBasedMarkdownRenderer implements Markdown { @VisibleForTesting String removeSpaceBetweenLinkLabelAndUrl(String markdown) { try { Matcher matcher = LINK_WITH_SPACE_MARKDOWN_PATTERN.matcher(markdown); while (matcher.find()) { String linkText = matcher.group(1); String linkUrl = matcher.group(2); markdown = markdown.substring(0, matcher.start()) + String.format("[%s](%s)", linkText, linkUrl) + markdown.substring(matcher.end(), markdown.length()); } } catch (Throwable e) { Timber.e(e, "Couldn't remove spaces between link and url in: %s", markdown); } return markdown; } @Inject  MarkwonBasedMarkdownRenderer(
      SpannableConfiguration configuration,
      AutoRedditLinkExtension autoRedditLinkExtension,
      EmptyListItemHandlerExtension emptyListItemHandlerExtension,
      MarkdownHintOptions markdownOptions,
      @Named("markwon_spans_renderer") Cache<String, CharSequence> cache); @Override CharSequence parse(PendingSyncReply reply); @Override CharSequence parseAuthorFlair(String flair); @Override CharSequence parse(Message message); @Override CharSequence parse(Comment comment); @Override CharSequence parseSelfText(Submission submission); @Override @Deprecated String stripMarkdown(Comment comment); @Override String stripMarkdown(Message message); @Override void clearCache();  }### Answer:
@Test public void fixInvalidLinks() { String invalid = "[title] (url)"; String expected = "[title](url)"; String parsed = renderer.removeSpaceBetweenLinkLabelAndUrl(invalid); assertEquals(expected, parsed); }