Enhance test for java core issue 334

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