@Test
public void testItemSelectorURLWhenNotAllowBrowseAndValidWikiPage()
	throws Exception {

	setAllowBrowseDocuments(false);
	setWikiPageResourcePrimKey(1);
	JSONObject originalJSONObject =
		getJSONObjectWithDefaultItemSelectorURL();
	JSONObject jsonObject = JSONFactoryUtil.createJSONObject(
		originalJSONObject.toJSONString());
	WikiAttachmentImageHTMLEditorConfigContributor
		wikiAttachmentImageHTMLEditorConfigContributor =
			new WikiAttachmentImageHTMLEditorConfigContributor();
	wikiAttachmentImageHTMLEditorConfigContributor.setItemSelector(
		_itemSelector);
	wikiAttachmentImageHTMLEditorConfigContributor.populateConfigJSONObject(
		jsonObject, _inputEditorTaglibAttributes, null, null);
	JSONObject expectedJSONObject = JSONFactoryUtil.createJSONObject(
		originalJSONObject.toJSONString());
	expectedJSONObject.put("removePlugins", "plugin1");
	JSONAssert.assertEquals(
		expectedJSONObject.toJSONString(), jsonObject.toJSONString(), true);
}