ColumnManagementView extends VerticalPanel { public void renderColumns(final Map<String, List<BaseColumn>> columnGroups) { clear(); for (String groupLabel : columnGroups.keySet()) { final VerticalPanel columnGroup = new VerticalPanel(); final HorizontalPanel columnGroupHeader = new HorizontalPanel(); final VerticalPanel columnGroupColumns = new VerticalPanel(); columnGroupHeader.add(new Label(groupLabel)); columnGroup.add(columnGroupHeader); columnGroup.add(columnGroupColumns); add(columnGroup); for (final BaseColumn column : columnGroups.get(groupLabel)) { if (column instanceof ActionCol52) { columnGroupColumns.add(renderColumn((ActionCol52) column)); } else if (column instanceof BRLConditionColumn) { columnGroupColumns.add(renderColumn((BRLConditionColumn) column)); } else if (column instanceof Pattern52) { renderColumn((Pattern52) column).forEach(columnGroupColumns::add); } } } } ColumnManagementView(); @Inject  ColumnManagementView(final ManagedInstance<DeleteColumnManagementAnchorWidget> deleteColumnManagementAnchorWidgets); void init(final GuidedDecisionTableModellerView.Presenter presenter); void renderColumns(final Map<String, List<BaseColumn>> columnGroups);  }
@Test public void testRenderColumnsClearTheView() throws Exception { view.renderColumns(Collections.emptyMap()); verify(view).clear(); }