Add testErrorHandling to reproduce error

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