@Test public void localdates_are_converted_to_strings_using_us_locale() { String value = new LocalDateConverter().getAsString(mock(FacesContext.class), mock(UIComponent.class), LocalDate.of(2012, APRIL, 3)); assertThat(value).isEqualTo("2012-04-03"); }
@Override public String getAsString(FacesContext context, UIComponent component, Object value) { if (null == value) { return ""; } return ((LocalDate) value).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); }
LocalDateConverter implements Converter { @Override public String getAsString(FacesContext context, UIComponent component, Object value) { if (null == value) { return ""; } return ((LocalDate) value).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); } }
LocalDateConverter implements Converter { @Override public String getAsString(FacesContext context, UIComponent component, Object value) { if (null == value) { return ""; } return ((LocalDate) value).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); }  }
LocalDateConverter implements Converter { @Override public String getAsString(FacesContext context, UIComponent component, Object value) { if (null == value) { return ""; } return ((LocalDate) value).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); }  @Override Object getAsObject(FacesContext context, UIComponent component, String value); @Override String getAsString(FacesContext context, UIComponent component, Object value); }
LocalDateConverter implements Converter { @Override public String getAsString(FacesContext context, UIComponent component, Object value) { if (null == value) { return ""; } return ((LocalDate) value).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); }  @Override Object getAsObject(FacesContext context, UIComponent component, String value); @Override String getAsString(FacesContext context, UIComponent component, Object value);  }