### Question:
MessageUtil { public static String colored(String message) { return message != null ? ChatColor.translateAlternateColorCodes('&', message) : null; } private  MessageUtil(); static String colored(String message); static List<String> colored(List<String> messages);  }### Answer:
@Test public void coloredSingleTest() { String expected = "§7Example §cstring§r."; String actual = MessageUtil.colored("&7Example &cstring&r."); Assert.assertEquals(expected, actual); }
@Test public void coloredListTest() { List<String> expected = Arrays.asList("§7Hello!", "§cHow are you?", "§6I'm fine, thanks!"); List<String> actual = MessageUtil.colored( Arrays.asList("&7Hello!", null, "&cHow are you?", null, "&6I'm fine, thanks!")); Assert.assertEquals(expected, actual); }