### Question:
DefaultStringEditor extends PropertyEditorSupport { @Override public String getAsText() { Object value = getValue(); return (value != null ? value.toString() : ""); } DefaultStringEditor(boolean emptyAsNull); @Override void setAsText(String text); @Override String getAsText();  }### Answer:
@Test public void nullValueShouldBeReturnedAsEmptyString() { editor = new DefaultStringEditor(false); editor.setValue(null); assertEquals("", editor.getAsText(), "Null value should be returned as empty string."); }
@Test public void notNullValueShouldBeReturnedWithoutTransforms() { editor = new DefaultStringEditor(false); editor.setValue(null); assertEquals("", editor.getAsText(), "Not null value should be returned without any transforms."); }