public void shouldUpsertAndReplace() {
JsonObject content = JsonObject.empty().put("hello", "world");
final JsonDocument doc = JsonDocument.create("upsert-r", content);
bucket().upsert(doc);
JsonDocument response = bucket().get("upsert-r");
assertEquals(content.getString("hello"), response.content().getString("hello"));
JsonDocument updated = JsonDocument.from(response, JsonObject.empty().put("hello", "replaced"));
bucket().replace(updated);
response = bucket().get("upsert-r");
assertEquals("replaced", response.content().getString("hello"));