Fixes #243 - was a bug in the test mock not in underlying code.

https://github.com/couchbase/couchbase-lite-java-core/issues/243