Component implements HasElement, AttachNotifier, DetachNotifier { protected <T extends ComponentEvent<?>> Registration addListener( Class<T> eventType, ComponentEventListener<T> listener) { return getEventBus().addListener(eventType, listener); } 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 removeOnRegistration_registrationIsIdempotent() { TestDiv div = new TestDiv(); Registration registration = div.addListener(ComponentEvent.class, (ComponentEventListener) event -> { }); registration.remove(); registration.remove(); }