@Test
public void testAddPingbackWithFriendlyURL() throws Exception {

	long plid = RandomTestUtil.randomLong();
	String friendlyURL = RandomTestUtil.randomString();
	Mockito.when(
		_portal.getPlidFromFriendlyURL(_COMPANY_ID, "/" + friendlyURL)
	).thenReturn(
		plid
	);
	long groupId = RandomTestUtil.randomLong();
	Mockito.when(
		_portal.getScopeGroupId(plid)
	).thenReturn(
		groupId
	);
	String friendlyURLPath = RandomTestUtil.randomString();
	whenFriendlyURLMapperPopulateParams(
		"/" + friendlyURLPath, "urlTitle", _URL_TITLE);
	String targetURI = StringBundler.concat(
		"http://", RandomTestUtil.randomString(), "/", friendlyURL, "/-/",
		friendlyURLPath);
	whenHttpURLToString(
		StringBundler.concat(
			"<body><a href='", targetURI, "'>",
			RandomTestUtil.randomString(), "</a></body>"));
	execute(targetURI);
	verifySuccess();
	Mockito.verify(
		_blogsEntryLocalService
	).getEntry(
		groupId, _URL_TITLE
	);
}