AddGlobalPopup implements AddGlobalPopupView.Presenter { public void show(final Command addCommand, final Command cancelCommand, final List<String> fullyQualifiedClassNames) { this.addCommand = PortablePreconditions.checkNotNull("addCommand", addCommand); this.cancelCommand = PortablePreconditions.checkNotNull("cancelCommand", cancelCommand); PortablePreconditions.checkNotNull("fullyQualifiedClassNames", fullyQualifiedClassNames); view.clear(); view.setClassNames(fullyQualifiedClassNames); view.show(); } @Inject  AddGlobalPopup(final AddGlobalPopupView view); @PostConstruct void init(); String getAlias(); String getClassName(); void show(final Command addCommand,
                     final Command cancelCommand,
                     final List<String> fullyQualifiedClassNames); @Override void onAliasInputChanged(); @Override void onClassNameSelectChanged(); @Override void onAddButtonClicked(); @Override void onCancelButtonClicked();  }
@Test public void show() { List<String> classNames = Arrays.asList( "fqn1" ); addGlobalPopup.show( () -> {}, () -> {}, classNames ); verify( view, times( 1 ) ).clear(); verify( view, times( 1 ) ).setClassNames( classNames ); verify( view, times( 1 ) ).show(); }