I’m trying to mock Spring mongo repository save(object) using mockk as below
every { repositoryBean.save(any())} return Object(id=“1234”, timesatmp= 123446767, name= “sam”) but this shows me an error Type inference failed
i also tried every { repositoryBean.save(Object(id=null, timestamp=any(), name=“sam”)} return Object(id=“1234", timesatmp= 123446767, name= “sam”)
this also failed throwing Failed matching mocking signature for …..left matchers: [any(), any()]
I don’t know the timestamp, as it is created dynamically and hence I can’t provide strict arguments
can someone help me?