+ @Test
+ fun `parser filter can be created by guice`() {
+ val injector = Guice.createInjector(
+ Core::class.isProvidedByMock(),
+ SoneTextParser::class.isProvidedByMock()
+ )
+ assertThat(injector.getInstance<ParserFilter>(), notNullValue())
+ }
+
+ @Test
+ fun `parser filter is created as singleton`() {
+ val injector = Guice.createInjector(
+ Core::class.isProvidedByMock(),
+ SoneTextParser::class.isProvidedByMock()
+ )
+ val firstInstance = injector.getInstance<ParserFilter>()
+ val secondInstance = injector.getInstance<ParserFilter>()
+ assertThat(firstInstance, sameInstance(secondInstance))
+
+ }
+