AddGlobalPopup implements AddGlobalPopupView.Presenter { @Override public void onClassNameSelectChanged() { checkClassNameValidationErrors(); } @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 validateClassNameWithFailures() { when( view.getSelectedClassName() ).thenReturn( "" ); addGlobalPopup.onClassNameSelectChanged(); verify( view, times( 1 ) ).showClassNameValidationError(); }
@Test public void validateClassNameWithNoFailures() { when( view.getSelectedClassName() ).thenReturn( "className" ); addGlobalPopup.onClassNameSelectChanged(); verify( view, times( 1 ) ).hideClassNameValidationError(); }