BranchNotificationMessageBuilderSlack { public Message getNewMessage(String channel, String pr, List<String> sourceStrings) { Message message = getBaseMessage(channel, pr, sourceStrings, "We received your strings! Please *add screenshots* as soon as possible and *wait for translations* before releasing."); 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 testGetNewMessage() { Message newMessage = branchNotificationMessageBuilderSlack.getNewMessage("channel-test", "pr-test", Arrays.asList("string1", "string2")); String json = objectMapper.writeValueAsStringUnchecked(newMessage); assertEquals("{\"channel\":\"channel-test\",\"text\":null,\"attachments\":[{\"title\":null,\"text\":\"W" + "e received your strings! Please *add screenshots* as soon as possible and *wait for translations* befor" + "e releasing.\",\"fallback\":null,\"color\":\"good\",\"actions\":[{\"type\":\"button\",\"text\":\"Screen" + "shots\",\"url\":\"http: "ary\"}],\"fields\":[{\"title\":\"PR\",\"value\":\"pr-test\",\"short\":true},{\"title\":\"String number" + "\",\"value\":\"2\",\"short\":true},{\"title\":\"Strings\",\"value\":\"string1, string2\",\"short\":null" + "}],\"mrkdwn_in\":[\"text\",\"pretex\",\"fields\"]}],\"thread_ts\":null}", json); }