blipData = new BlipData(s(WAVE_ID), s(WAVELET_ID), TEMP_BLIP_ID, NEW_BLIP_CONTENT);
blipData.setBlipId(TEMP_BLIP_ID);
}
public void testAddParticipant() throws Exception {
OperationContextImpl context = helper.getContext();
ObservableConversation conversation =
context.openConversation(WAVE_ID, WAVELET_ID, ROBOT).getRoot();
String rootBlipId = ConversationUtil.getRootBlipId(conversation);
// Confirm alex is not on wave prior to operation.
Set<ParticipantId> participants = conversation.getParticipantIds();
assertFalse("Alex should not be a participant on wavelet prior to operation to add him.",
participants.contains(ALEX));
OperationRequest operation =
operationRequest(OperationType.WAVELET_ADD_PARTICIPANT_NEWSYNTAX, rootBlipId,
Parameter.of(ParamsProperty.PARTICIPANT_ID,ALEX.getAddress()));
service.execute(operation, context, ROBOT);
JsonRpcResponse response = context.getResponse(OPERATION_ID);
assertFalse("Add Participant generated error in service execution.", response.isError());
// Verify Alex is now a participant on the wave.
participants = conversation.getParticipantIds();
assertTrue("Alex should now be a participant on the wavelet.", participants.contains(ALEX));