// Ack the configurator's add-participant
assertEquals(1, waveViewService.submits.size());
waveViewService.lastSubmit().callback
.onSuccess(HashedVersion.of(1L, sig(111)), 1, null, ResponseCode.OK);
DeltaTestUtil util = new DeltaTestUtil(USER_ID);
// Receive an operation from the server that doesn't affect the document.
TransformedWaveletDelta delta1 =
util.delta(1L, util.addParticipant(new ParticipantId("reuben@example.com")));
openCallback.onUpdate(new FakeWaveViewServiceUpdate()
.setWaveletId(GENERATED_WAVELET_ID).addDelta(delta1));
assertEquals(2, createdWavelet.getParticipantIds().size());
// create an empty blip edit (i.e. implicit creation) and expect flush
TransformedWaveletDelta delta2 = util.delta(2L, util.noOpDocOp(GENERATED_BLIP_ID));
openCallback.onUpdate(new FakeWaveViewServiceUpdate()
.setWaveletId(GENERATED_WAVELET_ID).addDelta(delta2));
doc.expectedCall(MockCcDocument.MethodCall.FLUSH);
doc.expectedCall(MockCcDocument.MethodCall.CONSUME);
doc.expectedNothing();
// now hold back flush on another server op
doc.flush_return = false;
TransformedWaveletDelta delta3 = util.delta(3L, util.noOpDocOp(GENERATED_BLIP_ID));
openCallback.onUpdate(new FakeWaveViewServiceUpdate()
.setWaveletId(GENERATED_WAVELET_ID).addDelta(delta3));
MockCcDocument.MethodCallContext callContext =
doc.expectedCall(MockCcDocument.MethodCall.FLUSH);
doc.expectedNothing();