@Test
public void replaceExisting() throws PatchApplicationException {

  store.put(DOCUMENT_ID, jsonNode1);
  PatchSet patchSet = patchSet(REPLACE, "", singletonMap("foo", "baz"));
  JsonNode result = underTest.processPatch(patchSet);
  assertThat(result, is(jsonNode2));
  assertThat(store.get(DOCUMENT_ID), is(jsonNode2));
}