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