### Question:
YearEditor extends PropertyEditorSupport { @Override public void setAsText(String text) { if (Strings.isNullOrEmpty(text)) { setValue(null); } else { setValue(new Year(Integer.parseInt(text))); } }  @Override String getAsText(); @Override void setAsText(String text);  }### Answer:
@Test public void SetAsTextString() { editor.setAsText("2000"); assertEquals(new Year(2000), editor.getValue()); }