void () { MessageFormatUtil.MessageHolder result = MessageFormatUtil.parseMessageHolder( "{0} choice: {0, choice,-1#'''' - 2 quotes|0<more|2<''1{0}'' '''' - 1 quote|3≤{0, number, '#'.00}}"); Assert.assertTrue(result.getErrors().isEmpty()); Assert.assertTrue(ContainerUtil.exists(result.getParts(), t -> t.getText().equals("1{0} ' - 1 quote"))); Assert.assertTrue(ContainerUtil.exists(result.getParts(), t -> t.getText().equals("'' - 2 quotes"))); Assert.assertTrue(ContainerUtil.exists(result.getParts(), t -> t.getText().equals("{0,number, #.00}") && t.getParsedType() == MessageFormatUtil.MessageFormatParsedType.FORMAT_ELEMENT)); result = MessageFormatUtil.parseMessageHolder( "nested choice: {0, choice,0# inner'{0, choice,1#test1|2#test2}'|3# inner 2}}