Skip to content

Commit f004776

Browse files
authored
Fix message event usage in test (#1763)
Fix missing updates from #1761
1 parent 3775ca9 commit f004776

File tree

1 file changed

+5
-4
lines changed
  • spring-boot/line-bot-spring-boot-handler/src/test/java/com/linecorp/bot/spring/boot/handler/support

1 file changed

+5
-4
lines changed

spring-boot/line-bot-spring-boot-handler/src/test/java/com/linecorp/bot/spring/boot/handler/support/EventTestUtil.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,11 @@ private EventTestUtil() {
3030
}
3131

3232
public static MessageEvent createTextMessage(final String text) {
33-
return new MessageEvent(
34-
new UserSource("userId"),
33+
return new MessageEvent.Builder(
3534
Instant.parse("2016-11-19T00:00:00.000Z").toEpochMilli(),
3635
EventMode.ACTIVE,
3736
"AAAAAAAAAAAAAA",
3837
new DeliveryContext(false),
39-
"replyToken",
4038
new TextMessageContent(
4139
"id",
4240
text,
@@ -45,6 +43,9 @@ public static MessageEvent createTextMessage(final String text) {
4543
null,
4644
null
4745
)
48-
);
46+
)
47+
.source(new UserSource("userId"))
48+
.replyToken("replyToken")
49+
.build();
4950
}
5051
}

0 commit comments

Comments
 (0)