@Test
public void handleUpdateTest() throws Exception {

  given(agent.updatedModel("key", JSON_STRING_1, JSON_STRING_2)).willReturn(OPERATIONS);
  observer.handleUpdate("key", JSON_STRING_1, JSON_STRING_2);
  verify(emitter).emit(patchSet.capture());
  assertThat(patchSet.getValue().getOperations(), is(OPERATIONS));
}