diff --git a/spring-boot/line-bot-spring-boot-handler/src/test/java/com/linecorp/bot/spring/boot/handler/support/EventTestUtil.java b/spring-boot/line-bot-spring-boot-handler/src/test/java/com/linecorp/bot/spring/boot/handler/support/EventTestUtil.java index 1a0916ca4..7b1cae6d3 100644 --- a/spring-boot/line-bot-spring-boot-handler/src/test/java/com/linecorp/bot/spring/boot/handler/support/EventTestUtil.java +++ b/spring-boot/line-bot-spring-boot-handler/src/test/java/com/linecorp/bot/spring/boot/handler/support/EventTestUtil.java @@ -30,13 +30,11 @@ private EventTestUtil() { } public static MessageEvent createTextMessage(final String text) { - return new MessageEvent( - new UserSource("userId"), + return new MessageEvent.Builder( Instant.parse("2016-11-19T00:00:00.000Z").toEpochMilli(), EventMode.ACTIVE, "AAAAAAAAAAAAAA", new DeliveryContext(false), - "replyToken", new TextMessageContent( "id", text, @@ -45,6 +43,9 @@ public static MessageEvent createTextMessage(final String text) { null, null ) - ); + ) + .source(new UserSource("userId")) + .replyToken("replyToken") + .build(); } }