use of com.symphony.user.UserId in project spring-bot by finos.
the class BotIT method testSendMessageRoomWithMention.
@Test
public void testSendMessageRoomWithMention() throws JsonProcessingException {
Mention m = new Mention();
m.setId(new ArrayList<>());
m.getId().add(new UserId("1234"));
EntityJson ej = new EntityJson();
ej.put("m1", m);
String data = symphonyObjectMapper.writeValueAsString(ej);
V4Event in = new V4Event().initiator(new V4Initiator().user(new V4User().email("rob@example.com").displayName("Rob Example").userId(2438923l))).payload(new V4Payload().messageSent(new V4MessageSent().message(new V4Message().message("<div>hello</div>").stream(new V4Stream().streamId("ABC123").streamType("ROOM")).data(data))));
getPublicBot().sendToConsumer(in);
littleSleep();
wireMockRule.verify(1, WireMock.postRequestedFor(urlPathMatching("/agent/v4/stream/ABC123/message/create")));
}
Aggregations