[Feature request] Why is Document a final class?

I know really little about jni, so here is my question: Is it possible to make Document not final in Java? Or create an interface with all the methods and that Document implements it?

My problem is to mock final classes. It’s not impossible but it’s complicated.

I would love Unit Test my code without PowerMock or a whole Couchbase Lite Database instance.

The idea was that we didn’t want users to subclass Document, because that is not a supported approach to using couchbase lite.

However, since this is a blocker for you, I went ahead and removed “final” on the master branch:

Btw, these kinds of change requests are better filed in our github issue tracker: https://github.com/couchbase/couchbase-lite-java-core/issues