public void testParseSimple2() throws ParseException {
String str = "Message {0} has one arg, '{0}'";
List<TemplateChunk> parsed = MessageStyle.MESSAGE_FORMAT.parse(str);
assertEquals(3, parsed.size());
TemplateChunk chunk = parsed.get(0);
assertTrue(chunk.isLiteral());
assertEquals("Message ", chunk.getString());
chunk = parsed.get(1);
assertFalse(chunk.isLiteral());
assertEquals("{0}", chunk.getString());
ArgumentChunk argChunk = (ArgumentChunk) chunk;
assertEquals(0, argChunk.getArgumentNumber());
assertNull(argChunk.getFormat());
assertNull(argChunk.getSubFormat());
chunk = parsed.get(2);
assertTrue(chunk.isLiteral());
assertEquals(" has one arg, {0}", chunk.getString());
}