messages.put("{\"text\":\"\",\"extra\":[{\"text\":\"\",\"extra\":[{\"text\":\"[\",\"color\":\"gray\"},{\"text\":\"H\",\"color\":\"yellow\"},{\"text\":\"]\",\"color\":\"gray\"},{\"text\":\"\",\"color\":\"white\"},{\"text\":\"GUEST\",\"color\":\"#b7b7b7\",\"bold\":true}]},{\"text\":\"\",\"extra\":[{\"text\":\"\",\"bold\":true},{\"text\":\"»\",\"color\":\"blue\"},{\"text\":\"\",\"color\":\"gray\"}]},{\"text\":\"\",\"extra\":[{\"text\":\"rtm516\",\"color\":\"white\"},{\"text\":\": \",\"color\":\"gray\"},{\"text\":\"\",\"color\":\"white\"}]},{\"text\":\"\",\"extra\":[{\"text\":\"This is an amazing bedrock test message\",\"color\":\"white\"}]}]}\n",
"§r§7[§r§eH§r§7]§r§f §r§7§lGUEST§r§l §r§9»§r§7 §r§frtm516§r§7: §r§fThis is an amazing bedrock test message");
Assertions.assertEquals("\n\n\n\n",MessageTranslator.convertMessageLenient("\n\n\n\n"),"All newline message is not handled properly");
Assertions.assertEquals("",MessageTranslator.convertMessageLenient(""),"Empty message is not handled properly");
Assertions.assertEquals("§r§eGame Selector",MessageTranslator.convertMessageLenient("§r§eGame Selector"),"Reset before message is not handled properly");
Assertions.assertEquals("Bold Underline",MessageTranslator.convertMessageLenient("§m§nBold Underline"),"Unimplemented formatting chars not stripped");
Assertions.assertEquals("Many colors here",MessageTranslator.convertToPlainText("{\"extra\":[{\"color\":\"red\",\"text\":\"M\"},{\"color\":\"gold\",\"text\":\"a\"},{\"color\":\"yellow\",\"text\":\"n\"},{\"color\":\"green\",\"text\":\"y \"},{\"color\":\"aqua\",\"text\":\"c\"},{\"color\":\"dark_purple\",\"text\":\"o\"},{\"color\":\"red\",\"text\":\"l\"},{\"color\":\"gold\",\"text\":\"o\"},{\"color\":\"yellow\",\"text\":\"r\"},{\"color\":\"green\",\"text\":\"s \"},{\"color\":\"aqua\",\"text\":\"h\"},{\"color\":\"dark_purple\",\"text\":\"e\"},{\"color\":\"red\",\"text\":\"r\"},{\"color\":\"gold\",\"text\":\"e\"}],\"text\":\"\"}","en_US"),"JSON message is not handled properly");
Assertions.assertEquals("Many colors here",MessageTranslator.convertToPlainText("§cM§6a§en§ay §bc§5o§cl§6o§er§as §bh§5e§cr§6e"),"Legacy formatted message is not handled properly (Colors)");
Assertions.assertEquals("Many colors here",MessageTranslator.convertToPlainText("§cM§6a§en§ay §bc§5o§cl§6o§er§as §bh§5e§cr§6e","en_US"),"Legacy formatted message is not handled properly (Colors)");
Assertions.assertEquals("Obf Bold Strikethrough Underline Italic Reset",MessageTranslator.convertToPlainText("§kObf §lBold §mStrikethrough §nUnderline §oItalic §rReset","en_US"),"Legacy formatted message is not handled properly (Style)");
Assertions.assertEquals("Strange",MessageTranslator.convertToPlainText("§rStrange","en_US"),"Valid lenient JSON is not handled properly");
Assertions.assertEquals("",MessageTranslator.convertToPlainText("","en_US"),"Empty message is not handled properly");
Assertions.assertEquals("",MessageTranslator.convertToPlainText("","en_US"),"Whitespace is not preserved");