midje

dbernal 2022-02-11T14:38:44.740189Z

Is it possible to mock calls to Java interfaces? For example, I’m trying to do something like this:

(def cursor
  (reify MongoCursor))

(fact "test that cursor gets called"
  (sut/some-func-that-calls-mongo [--test-data--])
  => []
  (provided (.hasNext cursor) => false))
Currently getting
Unable to resolve var: .hasNext in this context