@Test
public void handleNewTest() throws Exception {

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