public static String toAbsoluteUrl(String relativeUrl, String feedLink, String feedUrl) {
		String baseUrl = (feedLink != null && isAbsoluteUrl(feedLink)) ? feedLink : feedUrl;
		if (baseUrl == null) {
			return null;
		}

		try {
			return new URL(new URL(baseUrl), relativeUrl).toString();
		} catch (MalformedURLException e) {
			log.debug("could not parse url : {}", e.getMessage(), e);
			return null;
		}
	}
@Test
	void testToAbsoluteUrl() {
		String expected = "http://a.com/blog/entry/1";

		// usual cases
		Assertions.assertEquals(expected, FeedUtils.toAbsoluteUrl("http://a.com/blog/entry/1", "http://a.com/feed/", "http://a.com/feed/"));
		Assertions.assertEquals(expected, FeedUtils.toAbsoluteUrl("http://a.com/blog/entry/1", "http://a.com/feed", "http://a.com/feed"));

		// relative links
		Assertions.assertEquals(expected, FeedUtils.toAbsoluteUrl("../blog/entry/1", "http://a.com/feed/", "http://a.com/feed/"));
		Assertions.assertEquals(expected, FeedUtils.toAbsoluteUrl("../blog/entry/1", "feed.xml", "http://a.com/feed/feed.xml"));

		// root-relative links
		Assertions.assertEquals(expected, FeedUtils.toAbsoluteUrl("/blog/entry/1", "/feed", "http://a.com/feed"));

		// real cases
		Assertions.assertEquals("https://github.com/erusev/parsedown/releases/tag/1.3.0", FeedUtils.toAbsoluteUrl(
				"/erusev/parsedown/releases/tag/1.3.0", "/erusev/parsedown/releases", "https://github.com/erusev/parsedown/tags.atom"));
		Assertions.assertEquals("http://ergoemacs.org/emacs/elisp_all_about_lines.html",
				FeedUtils.toAbsoluteUrl("elisp_all_about_lines.html", "blog.xml", "http://ergoemacs.org/emacs/blog.xml"));

	}