@Test public void testMarshal() throws Exception { LocaleCodeAdapter adapter = new LocaleCodeAdapter(); assertThat(adapter.marshal(null)).isNull(); assertThat(adapter.marshal(LocaleCode.EN)).isNotNull().isEqualTo("en"); }
public @Nullable String marshal(@Nullable LocaleCode localeCode) throws Exception { if (localeCode == null) { return null; } return localeCode.toString(); }
LocaleCodeAdapter extends XmlAdapter<String, LocaleCode> { public @Nullable String marshal(@Nullable LocaleCode localeCode) throws Exception { if (localeCode == null) { return null; } return localeCode.toString(); } }
LocaleCodeAdapter extends XmlAdapter<String, LocaleCode> { public @Nullable String marshal(@Nullable LocaleCode localeCode) throws Exception { if (localeCode == null) { return null; } return localeCode.toString(); }  }
LocaleCodeAdapter extends XmlAdapter<String, LocaleCode> { public @Nullable String marshal(@Nullable LocaleCode localeCode) throws Exception { if (localeCode == null) { return null; } return localeCode.toString(); }  @Nullable LocaleCode unmarshal(@Nullable String s); @Nullable String marshal(@Nullable LocaleCode localeCode); }
LocaleCodeAdapter extends XmlAdapter<String, LocaleCode> { public @Nullable String marshal(@Nullable LocaleCode localeCode) throws Exception { if (localeCode == null) { return null; } return localeCode.toString(); }  @Nullable LocaleCode unmarshal(@Nullable String s); @Nullable String marshal(@Nullable LocaleCode localeCode);  }