AMJournalArticleExportImportContentProcessor implements ExportImportContentProcessor<String> { @Override public String replaceImportContentReferences( PortletDataContext portletDataContext, StagedModel stagedModel, String content) throws Exception { String replacedContent = _journalArticleExportImportContentProcessor. replaceImportContentReferences( portletDataContext, stagedModel, content); if (!_hasTextHTMLDDMFormField(stagedModel)) { return replacedContent; } return _amJournalArticleContentHTMLReplacer.replace( replacedContent, html -> _htmlExportImportContentProcessor. replaceImportContentReferences( portletDataContext, stagedModel, html)); }  @Override String replaceExportContentReferences(
			PortletDataContext portletDataContext, StagedModel stagedModel,
			String content, boolean exportReferencedContent,
			boolean escapeContent); @Override String replaceImportContentReferences(
			PortletDataContext portletDataContext, StagedModel stagedModel,
			String content); @Override void validateContentReferences(long groupId, String content);  }
@Test public void testImportCallsBothExportImportContentProcessors() throws Exception { String originalContent = RandomTestUtil.randomString(); String journalArticleReplacedContent = RandomTestUtil.randomString(); Mockito.doReturn( journalArticleReplacedContent ).when( _journalArticleExportImportContentProcessor ).replaceImportContentReferences( _portletDataContext, _journalArticle, originalContent ); String adaptiveMediaReplacedContent = RandomTestUtil.randomString(); Mockito.doReturn( adaptiveMediaReplacedContent ).when( _htmlExportImportContentProcessor ).replaceImportContentReferences( _portletDataContext, _journalArticle, journalArticleReplacedContent ); Assert.assertEquals( adaptiveMediaReplacedContent, _amJournalArticleExportImportContentProcessor. replaceImportContentReferences( _portletDataContext, _journalArticle, originalContent)); }