-abstract class WebPageTest2(pageSupplier: (Template, WebInterface) -> SoneTemplatePage) {
-
- protected val currentSone = mock<Sone>()
- protected val template = mock<Template>()
- protected val webInterface = deepMock<WebInterface>()
- protected val core = webInterface.core!!
- private val eventBus = mock<EventBus>()
- protected val preferences = Preferences(eventBus)
- protected val l10n = webInterface.l10n!!
-
- protected val page by lazy { pageSupplier(template, webInterface) }
- private val httpRequest = mock<HTTPRequest>()
- protected val freenetRequest = mock<FreenetRequest>()
- protected val templateContext = TemplateContext()
-
- protected val toadletContext = deepMock<ToadletContext>()
+open class WebPageTest2(pageSupplier: (Template, WebInterface) -> SoneTemplatePage = { _, _ -> mock<SoneTemplatePage>() }) {
+
+ val currentSone = mock<Sone>()
+ val template = mock<Template>()
+ val webInterface = deepMock<WebInterface>()
+ val core = webInterface.core!!
+ val eventBus = mock<EventBus>()
+ val preferences = Preferences(eventBus)
+ val l10n = webInterface.l10n!!
+
+ val page by lazy { pageSupplier(template, webInterface) }
+ val httpRequest = mock<HTTPRequest>()
+ val freenetRequest = mock<FreenetRequest>()
+ val templateContext = TemplateContext()
+ val toadletContext = deepMock<ToadletContext>()
+ val responseContent = ByteArrayOutputStream()
+ val response = Response(responseContent)
+