### Question:
ContentViewerHelper implements IContentViewerHelper { @Override public ContentRenderizationInfo getRenderizationInfo(String contentId, String modelId, boolean publishExtraTitle, RequestContext reqCtx) throws ApsSystemException { ContentRenderizationInfo renderizationInfo = null; try { Lang currentLang = (Lang) reqCtx.getExtraParam(SystemConstants.EXTRAPAR_CURRENT_LANG); String langCode = currentLang.getCode(); Widget widget = (Widget) reqCtx.getExtraParam(SystemConstants.EXTRAPAR_CURRENT_WIDGET); ApsProperties widgetConfig = (null != widget) ? widget.getConfig() : null; contentId = this.extractContentId(contentId, widgetConfig, reqCtx); modelId = this.extractModelId(contentId, modelId, widgetConfig, reqCtx); if (contentId != null && modelId != null) { long longModelId = new Long(modelId).longValue(); this.setStylesheet(longModelId, reqCtx); renderizationInfo = this.getContentDispenser().getRenderizationInfo(contentId, longModelId, langCode, reqCtx, true); if (null == renderizationInfo) { logger.info("Null Renderization informations: content={}", contentId); return null; } this.getContentDispenser().resolveLinks(renderizationInfo, reqCtx); this.manageAttributeValues(renderizationInfo, publishExtraTitle, reqCtx); } else { logger.warn("Parametri visualizzazione contenuto incompleti: " + "contenuto={} modello={}", contentId, modelId); } } catch (Throwable t) { logger.error("Error extracting renderization info", t); throw new ApsSystemException("Error extracting renderization info", t); } return renderizationInfo; }  @Override String getRenderedContent(String contentId, String modelId, RequestContext reqCtx); @Override String getRenderedContent(String contentId, String modelId, boolean publishExtraTitle, RequestContext reqCtx); @Override ContentRenderizationInfo getRenderizationInfo(String contentId, String modelId, boolean publishExtraTitle, RequestContext reqCtx); @Override PublicContentAuthorizationInfo getAuthorizationInfo(String contentId, RequestContext reqCtx); void setContentModelManager(IContentModelManager contentModelManager); void setContentManager(IContentManager contentManager); void setContentDispenser(IContentDispenser contentDispenser); void setContentAuthorizationHelper(IContentAuthorizationHelper contentAuthorizationHelper);  }### Answer:
@Test public void getRenderizationInfo() throws Exception { ContentModel model = Mockito.mock(ContentModel.class); when(this.contentModelManager.getContentModel(Mockito.anyLong())).thenReturn(model); when(this.contentManager.getDefaultModel(Mockito.anyString())).thenReturn("68"); when(model.getStylesheet()).thenReturn(null); when(model.getContentShape()).thenReturn("Body of content model"); when(this.contentDispenser.getRenderizationInfo(Mockito.anyString(), Mockito.anyLong(), Mockito.anyString(), Mockito.any(RequestContext.class), Mockito.anyBoolean())).thenReturn(null); String renderedContent = this.contentViewerHelper.getRenderedContent("ART124", "default", reqCtx); Assert.assertNotNull(renderedContent); Assert.assertTrue(StringUtils.isBlank(renderedContent)); Mockito.verify(contentDispenser, Mockito.times(1)).getRenderizationInfo("ART124", 68, "en", reqCtx, true); Mockito.verify(contentDispenser, Mockito.times(0)).resolveLinks(Mockito.any(ContentRenderizationInfo.class), Mockito.any(RequestContext.class)); Mockito.verify(reqCtx, Mockito.times(1)).getExtraParam(SystemConstants.EXTRAPAR_CURRENT_LANG); Mockito.verify(reqCtx, Mockito.times(1)).getExtraParam(SystemConstants.EXTRAPAR_CURRENT_WIDGET); Mockito.verify(reqCtx, Mockito.times(0)).getExtraParam(SystemConstants.EXTRAPAR_HEAD_INFO_CONTAINER); Mockito.verify(contentManager, Mockito.times(1)).getDefaultModel("ART124"); }