ItemViewer { public U getUiRoot() { return itemUiList.getUiRoot(); } ItemViewer( ItemViewerCompound<T, U> itemViewerCompound ); void createUi( U parent ); U getUiRoot(); void initialize(); void fetchNew(); void update();  }
@Test public void getUiRoot() { Object expected = new Object(); when( itemUiList.getUiRoot() ).thenReturn( expected ); Object actual = itemViewer.getUiRoot(); assertThat( actual ).isSameAs( expected ); }