### Question:
TextArea extends AbstractTextField { @Override public void clear() { setValue(""); } TextArea();  TextArea(String caption);  TextArea(Property dataSource);  TextArea(String caption, Property dataSource);  TextArea(String caption, String value); void setRows(int rows); int getRows(); void setWordwrap(boolean wordwrap); boolean isWordwrap(); @Override void readDesign(Element design, DesignContext designContext); @Override void writeDesign(Element design, DesignContext designContext); @Override void clear();  }### Answer:
@Test public void emptyAfterClearUsingPDS() { TextArea tf = new TextArea(new ObjectProperty<String>("foo")); Assert.assertFalse(tf.isEmpty()); tf.clear(); Assert.assertTrue(tf.isEmpty()); }
@Test public void emptyAfterClear() { TextArea tf = new TextArea(); tf.setValue("foobar"); Assert.assertFalse(tf.isEmpty()); tf.clear(); Assert.assertTrue(tf.isEmpty()); }
@Test public void emptyAfterClearUsingPDS() { TextArea tf = new TextArea(new ObjectProperty<String>("foo")); assertFalse(tf.isEmpty()); tf.clear(); assertTrue(tf.isEmpty()); }
@Test public void emptyAfterClear() { TextArea tf = new TextArea(); tf.setValue("foobar"); assertFalse(tf.isEmpty()); tf.clear(); assertTrue(tf.isEmpty()); }