AxiomUtils { public static Locale toLocale(String language) { language = language.replace('-', '_'); return StringUtils.parseLocaleString(language); }  static OMNamespace toNamespace(QName qName, OMElement resolveElement); static String toLanguage(Locale locale); static Locale toLocale(String language); static void removeContents(OMContainer container); static Document toDocument(SOAPEnvelope envelope); static SOAPEnvelope toEnvelope(Document document);  }
@Test public void testToLocale() throws Exception { Assert.assertEquals("Invalid conversion", Locale.CANADA_FRENCH, AxiomUtils.toLocale("fr-CA")); Assert.assertEquals("Invalid conversion", Locale.ENGLISH, AxiomUtils.toLocale("en")); }