val currentSone = mock<Sone>()
val template = mock<Template>()
val webInterface = deepMock<WebInterface>()
- val core = webInterface.core!!
+ val core = webInterface.core
val eventBus = mock<EventBus>()
val preferences = Preferences(eventBus)
val l10n = webInterface.l10n!!
whenever(core.preferences).thenReturn(preferences)
whenever(core.identityManager.allOwnIdentities).then { ownIdentities }
whenever(core.sones).then { allSones.values }
- whenever(core.getSone(anyString())).then { allSones[it[0]].asOptional() }
+ whenever(core.getSone(anyString())).then { allSones[it[0]] }
whenever(core.localSones).then { localSones.values }
whenever(core.getLocalSone(anyString())).then { localSones[it[0]] }
whenever(core.getPost(anyString())).then { allPosts[it[0]].asOptional() }