void () { DomApplicationComponent.getInstance().registerImplementation(MyElement.class, Impl.class, getTestRootDisposable()); DomApplicationComponent.getInstance().registerImplementation(InheritedElement.class, AnotherImpl.class, getTestRootDisposable()); MyElement element = createElement(""); final Object o = new Object(); element.setObject(o); assertSame(o, element.getObject()); element = createElement("", InheritedElement.class); element.setObject(o); assertSame(o, element.getObject()); assertSame(o, element.getObject()); }