Encapsulated Couchbase functions behind new interface DatabaseWrapper. Inject DatabaseWrapper instead of Bucket. Fixed integration tests by mocking DatabaseWrapper instead of Bucket. Fixed handling of ResponseStatus.NOT_EXISTS for DatabaseWrapper.getDocument() calls. Fixed handling of non-existent metadata document.