BaseView extends VerticalLayout implements BeforeLeaveObserver { @PostConstruct public final void init() { VerticalLayout main = initLayout(); doInit(main); } BaseView(boolean confirmBeforeLeave);  BaseView(); @PostConstruct final void init(); MessageService getMessageService(); EntityModelFactory getModelFactory(); UIHelper getUiHelper(); @Override void beforeLeave(BeforeLeaveEvent event); static final String SELECTED_ID; }
@Test public void testInit() { view.init(); assertEquals(1, view.getComponentCount()); }