### Question:
MediaWikiFormattingParser { public static final void parse(String text, ParserCallback callback) { Validate.notNull(text, "text must not be null"); Validate.notNull(callback, "callback must not be null"); new MediaWikiFormattingParser(text, callback); } private  MediaWikiFormattingParser(String text, ParserCallback callback); static final void parse(String text, ParserCallback callback);  }### Answer:
@Test public void testWikiFormatParser() { assertEquals("hello ' blah", parse("hello ' blah")); assertEquals("hello <i> blah", parse("hello '' blah")); assertEquals("hello <b> blah", parse("hello ''' blah")); assertEquals("hello l'<i>amour</i> l<b>ouest</b> blah", parse("hello l'''amour'' l'''ouest''' blah")); assertEquals("hello mon'<i>amour</i> blah", parse("hello mon'''amour'' blah")); assertEquals("hello '<i>amour</i> <b>blah </b>blah", parse("hello '''amour'' '''blah '''blah")); assertEquals("hello '<b>amour</b> now <i>italics unbalanced, but that's ok", parse("hello ''''amour''' now ''italics unbalanced, but that's ok")); assertEquals("hello '<b>amour</b> now, <b>bold unbalanced, but that's ok", parse("hello ''''amour''' now, '''bold unbalanced, but that's ok")); assertEquals("hello ''<i>amour<b> now </i></b>bold and italics unbalanced, so invoke this special case", parse("hello ''''amour''' now '''''bold and italics unbalanced, so invoke this special case")); assertEquals("hello <b><i> blah", parse("hello ''''' blah")); assertEquals("hello '''''<b><i> blah", parse("hello '''''''''' blah")); assertEquals("hello <b>bold '''''</b><i> blah", parse("hello '''bold '''''''''' blah")); }