@Test
public void testAdaptiveMediaFileEntryAttributeNameIsAdded()
	throws Exception {

	PortletURL itemSelectorPortletURL = mock(PortletURL.class);
	when(
		itemSelectorPortletURL.toString()
	).thenReturn(
		"itemSelectorPortletURL"
	);
	when(
		_itemSelector.getItemSelectorURL(
			Mockito.any(RequestBackedPortletURLFactory.class),
			Mockito.anyString(), Mockito.any(ItemSelectorCriterion.class))
	).thenReturn(
		itemSelectorPortletURL
	);
	when(
		_itemSelector.getItemSelectedEventName(Mockito.anyString())
	).thenReturn(
		"selectedEventName"
	);
	when(
		_itemSelector.getItemSelectorCriteria(
			"journalItemSelectorCriterionFileEntryItemSelectorReturnType")
	).thenReturn(
		_getBlogsItemSelectorCriterionFileEntryItemSelectorReturnType()
	);
	JSONObject originalJSONObject = JSONUtil.put(
		"filebrowserImageBrowseLinkUrl",
		"journalItemSelectorCriterionFileEntryItemSelectorReturnType");
	JSONObject jsonObject = JSONFactoryUtil.createJSONObject(
		originalJSONObject.toJSONString());
	AMJournalEditorConfigContributor amBlogsEditorConfigContributor =
		new AMJournalEditorConfigContributor();
	ReflectionTestUtil.setFieldValue(
		amBlogsEditorConfigContributor, "_itemSelector", _itemSelector);
	amBlogsEditorConfigContributor.populateConfigJSONObject(
		jsonObject, _inputEditorTaglibAttributes, _themeDisplay,
		_requestBackedPortletURLFactory);
	Assert.assertEquals(
		"data-fileentryid",
		jsonObject.get("adaptiveMediaFileEntryAttributeName"));
}