@Test public void isTemplate() throws Exception { when(wikiTemplateManager.isTemplate("wikiTemplate")).thenReturn(true); when(wikiTemplateManager.isTemplate("subwiki")).thenReturn(false); assertTrue(mocker.getComponentUnderTest().isTemplate("wikiTemplate")); assertFalse(mocker.getComponentUnderTest().isTemplate("subwiki")); }
public Boolean isTemplate(String wikiId) { try { return wikiTemplateManager.isTemplate(wikiId); } catch (WikiTemplateManagerException e) { error(String.format("Failed to get if the wiki [%s] is a template or not.", wikiId), e); return null; } }
WikiTemplateManagerScript implements ScriptService { public Boolean isTemplate(String wikiId) { try { return wikiTemplateManager.isTemplate(wikiId); } catch (WikiTemplateManagerException e) { error(String.format("Failed to get if the wiki [%s] is a template or not.", wikiId), e); return null; } } }
WikiTemplateManagerScript implements ScriptService { public Boolean isTemplate(String wikiId) { try { return wikiTemplateManager.isTemplate(wikiId); } catch (WikiTemplateManagerException e) { error(String.format("Failed to get if the wiki [%s] is a template or not.", wikiId), e); return null; } }  }
WikiTemplateManagerScript implements ScriptService { public Boolean isTemplate(String wikiId) { try { return wikiTemplateManager.isTemplate(wikiId); } catch (WikiTemplateManagerException e) { error(String.format("Failed to get if the wiki [%s] is a template or not.", wikiId), e); return null; } }  Exception getLastError(); Collection<WikiDescriptor> getTemplates(); boolean setTemplate(String wikiId, boolean value); Boolean isTemplate(String wikiId); @Deprecated boolean createWikiFromTemplate(String newWikiId, String newWikiAlias,
            String templateId, String ownerId, boolean failOnExist); @Deprecated Exception getLastException(); @Deprecated JobStatus getWikiProvisioningJobStatus(List<String> jobId); }
WikiTemplateManagerScript implements ScriptService { public Boolean isTemplate(String wikiId) { try { return wikiTemplateManager.isTemplate(wikiId); } catch (WikiTemplateManagerException e) { error(String.format("Failed to get if the wiki [%s] is a template or not.", wikiId), e); return null; } }  Exception getLastError(); Collection<WikiDescriptor> getTemplates(); boolean setTemplate(String wikiId, boolean value); Boolean isTemplate(String wikiId); @Deprecated boolean createWikiFromTemplate(String newWikiId, String newWikiAlias,
            String templateId, String ownerId, boolean failOnExist); @Deprecated Exception getLastException(); @Deprecated JobStatus getWikiProvisioningJobStatus(List<String> jobId); @Deprecated
    static final String CONTEXT_LASTEXCEPTION; }