DataSetDefPreviewTable implements IsWidget { void draw(final DisplayerListener displayerListener) { tableDisplayer.addListener(displayerListener); view.setDisplayer(tableDisplayer); tableDisplayer.draw(); } @Inject  DataSetDefPreviewTable(final DisplayerLocator displayerLocator,
                                  final DataSetClientServices clientServices,
                                  final View view); @PostConstruct void init(); @Override Widget asWidget(); void show(final DataSetDef dataSetDef, final Collection<DataColumnDef> columns,
                     final DisplayerListener displayerListener); void clear(); public View view; }
@Test public void testDraw() throws Exception { tested.tableDisplayer = displayer; tested.draw(displayerListener); verify(displayer, times(1)).addListener(displayerListener); verify(displayer, times(1)).draw(); verify(view, times(1)).setDisplayer(any(IsWidget.class)); verify(view, times(0)).init(tested); verify(view, times(0)).clear(); }