@Test
void createWhenWikiIdIsForbidden() throws Exception
{
when(this.wikiDescriptorManager.exists("wikiid1")).thenReturn(false);
when(this.xwiki.Param("xwiki.virtual.reserved_wikis")).thenReturn("forbidden,wikiid1");
Throwable exception = assertThrows(WikiManagerException.class, () -> {
this.wikiManager.create("wikiid1", "wikialias1", true);
});
assertEquals("wiki id [wikiid1] is already used and is thus not available", exception.getMessage());
}