### Question:
ContentAdminAction extends BaseAdminAction { public String reloadContentsReference() { try { this.buildMapping(); String result = this.configSystemParams(); if (!result.equals(SUCCESS)) { return result; } String typeCode = null; this.getContentManager().reloadEntitiesReferences(typeCode); logger.info("Reload contents reference started"); } catch (Throwable t) { logger.error("error in reloadContentsReference", t); return FAILURE; } return SUCCESS; }  @Override void validate(); @Override String configSystemParams(); String buildCsv(String key); @Override String updateSystemParams(); String addMetadata(); String removeMetadata(); String reloadContentsIndex(); String reloadContentsReference(); List<String> getResourceMetadataKeys(); int getContentManagerStatus(); int getSearcherManagerStatus(); int getContentManagerState(); int getSearcherManagerState(); LastReloadInfo getLastReloadInfo(); Map<String, List<String>> getMapping(); void setMapping(Map<String, List<String>> mapping); String getMetadataKey(); void setMetadataKey(String metadataKey); List<String> getMetadataKeys(); String getMetadataMapping(); void setMetadataMapping(String metadataMapping); void setMetadataKeys(List<String> metadataKeys); void setContentManager(IContentManager contentManager); String getAspectRatio(); void setAspectRatio(String aspectRatio); List<String> getRatio(); void setRatio(List<String> ratio); void setSearchEngineManager(ICmsSearchEngineManager searchEngineManager); void setResourceManager(IResourceManager resourceManager);  }### Answer:
@Test public void reloadContentsReference_1() throws Exception { when(configManager.getConfigItem(ArgumentMatchers.anyString())).thenReturn(CONFIG_PARAMETER); when(contentManager.reloadEntitiesReferences(null)).thenThrow(RuntimeException.class); String result = action.reloadContentsReference(); Assert.assertEquals(BaseAction.FAILURE, result); }
@Test public void reloadContentsReference_2() throws Exception { when(configManager.getConfigItem(ArgumentMatchers.anyString())).thenReturn(CONFIG_PARAMETER); String result = action.reloadContentsReference(); Assert.assertEquals(BaseAction.SUCCESS, result); Mockito.verify(contentManager, Mockito.times(1)).reloadEntitiesReferences(null); }