@Test
public void parse() {

    try {
        localeInfo = LocaleInfo.parse(null);
        fail();
    } catch (IllegalArgumentException e) {
        assertThat(e, TestUtil.exception("no locale name"));
    }
    try {
        localeInfo = LocaleInfo.parse("  ");
        fail();
    } catch (IllegalArgumentException e) {
        assertThat(e, TestUtil.exception("no locale name"));
    }
    assertEquals("en_US:UTF-8", LocaleInfo.parse(" en_US ").toString());
    assertEquals("en_US:UTF-8", LocaleInfo.parse(" en_US : ").toString());
    assertEquals("en_US:ISO-8859-1", LocaleInfo.parse(" en_US : 8859_1").toString());
}