BranchNotificationMessageBuilderSlack { public Message getScreenshotMissingMessage(String channel, String threadTs) { Message message = new Message(); message.setChannel(channel); message.setThreadTs(threadTs); message.setText(":warning: Please provide screenshots to help localization team :warning:"); return message; }  Message getNewMessage(String channel, String pr, List<String> sourceStrings); Message getUpdatedMessage(String channel, String threadTs, String pr, List<String> sourceStrings); Message getTranslatedMessage(String channel, String threadTs); Message getScreenshotMissingMessage(String channel, String threadTs);  }
@Test public void testGetScreenshotMissingMessage() { Message newMessage = branchNotificationMessageBuilderSlack.getScreenshotMissingMessage("channel-test", "pr-test"); String json = objectMapper.writeValueAsStringUnchecked(newMessage); assertEquals("{\"channel\":\"channel-test\",\"text\":\":warning: Please provide screenshots to help localization team :warning:\",\"attachments\":[],\"thread_ts\":\"pr-test\"}", json); }