+ whenever(core.localSones).then { localSones.values }
+ whenever(core.getLocalSone(anyString())).then { localSones[it[0]] }
+ whenever(core.getPost(anyString())).then { allPosts[it[0]].asOptional() }
+ }
+
+ @Before
+ fun setupWebInterface() {
+ whenever(webInterface.getCurrentSoneCreatingSession(eq(toadletContext))).thenReturn(currentSone)
+ whenever(webInterface.getCurrentSone(eq(toadletContext), anyBoolean())).thenReturn(currentSone)
+ whenever(webInterface.getCurrentSoneWithoutCreatingSession(eq(toadletContext))).thenReturn(currentSone)