### Question:
WikiManagerScriptService implements ScriptService { public Boolean idAvailable(String wikiId) { try { return wikiManager.idAvailable(wikiId); } catch (WikiManagerException e) { error(e); return null; } }  ScriptService get(String serviceName); Exception getLastError(); WikiDescriptor createWiki(String wikiId, String wikiAlias, String ownerId, boolean failOnExist); boolean deleteWiki(String wikiId); boolean canDeleteWiki(String userId, String wikiId); WikiDescriptor getByAlias(String wikiAlias); WikiDescriptor getById(String wikiId); Collection<WikiDescriptor> getAll(); Collection<String> getAllIds(); Boolean exists(String wikiId); Boolean idAvailable(String wikiId); WikiDescriptor getMainWikiDescriptor(); String getMainWikiId(); String getCurrentWikiId(); @Unstable WikiReference getCurrentWikiReference(); WikiDescriptor getCurrentWikiDescriptor(); boolean saveDescriptor(WikiDescriptor descriptor); boolean isPathMode(); String getAliasSuffix(); @Deprecated Exception getLastException(); static final String ROLEHINT; @Deprecated
    static final String CONTEXT_LASTEXCEPTION; }### Answer:
@Test public void idAvailable() throws Exception { when(wikiManager.idAvailable("wikiId")).thenReturn(true); when(wikiManager.idAvailable("no")).thenReturn(false); assertTrue(mocker.getComponentUnderTest().idAvailable("wikiId")); assertFalse(mocker.getComponentUnderTest().idAvailable("no")); }