### Question:
DocumentationLinksWidget extends Composite implements HasValue<DocumentationLinks>,
                                                                   HasEnabled { void refreshContainersVisibility() { if (getValue().getLinks().size() == 0) { HiddenHelper.show(noneContainer); HiddenHelper.hide(linksContainer); } else { HiddenHelper.hide(noneContainer); HiddenHelper.show(linksContainer); } } @Inject  DocumentationLinksWidget(final ManagedInstance<DocumentationLinkItem> listItems,
                                    final TranslationService translationService,
                                    final HTMLDivElement linksContainer,
                                    final HTMLDivElement noneContainer,
                                    final HTMLAnchorElement addButton,
                                    final NameAndUrlPopoverView.Presenter nameAndUrlPopover,
                                    final CellEditorControlsView cellEditor,
                                    @Named("span") final HTMLElement addLink,
                                    @Named("span") final HTMLElement noLink,
                                    final Event<LockRequiredEvent> locker,
                                    final @DMNEditor ReadOnlyProvider readOnlyProvider); @PostConstruct void init(); @Override DocumentationLinks getValue(); @Override void setValue(final DocumentationLinks documentationLinks); @Override void setValue(final DocumentationLinks documentationLinks,
                         final boolean fireEvents); @EventHandler("add-button") @SuppressWarnings("unused") void onClickTypeButton(final ClickEvent clickEvent); @Override HandlerRegistration addValueChangeHandler(final ValueChangeHandler<DocumentationLinks> handler); @Override boolean isEnabled(); @Override void setEnabled(final boolean enabled); void setDMNModel(final DRGElement model);  }### Answer:
@Test public void testRefreshContainersVisibility() { final DocumentationLinks value = mock(DocumentationLinks.class); final DMNExternalLink externalLink = mock(DMNExternalLink.class); final List<DMNExternalLink> links = new ArrayList<>(); links.add(externalLink); when(value.getLinks()).thenReturn(links); widget.setValue(value); widget.refreshContainersVisibility(); verify(noneContainerClassList).add(HiddenHelper.HIDDEN_CSS_CLASS); verify(linksContainerClassList).remove(HiddenHelper.HIDDEN_CSS_CLASS); links.clear(); widget.refreshContainersVisibility(); verify(noneContainerClassList).remove(HiddenHelper.HIDDEN_CSS_CLASS); verify(linksContainerClassList).add(HiddenHelper.HIDDEN_CSS_CLASS); }