Component implements HasElement, AttachNotifier, DetachNotifier { public Optional<String> getId() { return get(idDescriptor); } protected  Component(); protected  Component(Element element); @Override Element getElement(); Optional<Component> getParent(); Stream<Component> getChildren(); Optional<UI> getUI(); void setId(String id); Optional<String> getId(); boolean isAttached(); static T from(Element element,
            Class<T> componentType); void setVisible(boolean visible); boolean isVisible(); void onEnabledStateChanged(boolean enabled); String getTranslation(String key, Object... params); String getTranslation(String key, Locale locale, Object... params);  }
@Test public void wrappedComponentUsesElement() { Element div = new Element("div"); div.setAttribute("id", "foo"); Assert.assertEquals(Optional.of("foo"), div.as(TestDiv.class).getId()); }