<Unit Test kotlin for hibernate.sessionfactory.cre...
# stackoverflow
u
Unit Test kotlin for hibernate.sessionfactory.createQuery using mockk, what does this mean? I'm trying to mock out my calls to hibernate using the mockk framework. I need to mock the Query object that is returned by here. When I use the following code I get this compiler error, which not being a kotlin developer I don't understand. Type mismatch: inferred type is () -> Query but Query! was expected var mockedQuery = mockk{ } var mockSessionFactory = mockk { every { openSession() } returns mockk { every { get(any(), any()) } returns { null }...