Text extends Component implements HasText { @Override protected <T> void set(PropertyDescriptor<T, ?> descriptor, T value) { throw new UnsupportedOperationException("Cannot set '" + descriptor.getPropertyName() + "' property to the " + getClass().getSimpleName() + " component because it doesn't " + "represent an HTML Element but a text Node on the client side."); } Text(String text); @Override void setText(String text); @Override String getText(); @Override void setId(String id); @Override void setVisible(boolean visible);  }
@Test public void setFooProperty_throwsWithMeaningfulMessage() { assertExceptionOnSetProperty("foo"); new Text("").set(PropertyDescriptors.propertyWithDefault("foo", true), false); }