@Test public void convertToString() { final TimeZoneConverter con = new TimeZoneConverter(); final Locale locale = Locale.ENGLISH; assertNull(con.convertToString(null, locale)); assertTrue(con.convertToString(TimeZone.getTimeZone("Europe/Berlin"), locale).startsWith("Europe/Berlin (Central European")); assertEquals("CET (Central European Time)", con.convertToString(TimeZone.getTimeZone("CET"), locale)); }
@Override public String convertToString(final Object value, final Locale locale) { if (value == null) { return null; } final TimeZone timeZone = (TimeZone) value; return timeZone.getID() + " (" + timeZone.getDisplayName(locale) + ")"; }
TimeZoneConverter implements IConverter { @Override public String convertToString(final Object value, final Locale locale) { if (value == null) { return null; } final TimeZone timeZone = (TimeZone) value; return timeZone.getID() + " (" + timeZone.getDisplayName(locale) + ")"; } }
TimeZoneConverter implements IConverter { @Override public String convertToString(final Object value, final Locale locale) { if (value == null) { return null; } final TimeZone timeZone = (TimeZone) value; return timeZone.getID() + " (" + timeZone.getDisplayName(locale) + ")"; }  }
TimeZoneConverter implements IConverter { @Override public String convertToString(final Object value, final Locale locale) { if (value == null) { return null; } final TimeZone timeZone = (TimeZone) value; return timeZone.getID() + " (" + timeZone.getDisplayName(locale) + ")"; }  @Override Object convertToObject(final String value, final Locale locale); @Override String convertToString(final Object value, final Locale locale); }
TimeZoneConverter implements IConverter { @Override public String convertToString(final Object value, final Locale locale) { if (value == null) { return null; } final TimeZone timeZone = (TimeZone) value; return timeZone.getID() + " (" + timeZone.getDisplayName(locale) + ")"; }  @Override Object convertToObject(final String value, final Locale locale); @Override String convertToString(final Object value, final Locale locale);  }