AddGlobalPopup implements AddGlobalPopupView.Presenter { @Override public void onAliasInputChanged() { checkAliasValidationErrors(); } @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 validateAliasWithFailures() { when( view.getInsertedAlias() ).thenReturn( "" ); addGlobalPopup.onAliasInputChanged(); verify( view, times( 1 ) ).showAliasValidationError(); }
@Test public void validateAliasWithNoFailures() { when( view.getInsertedAlias() ).thenReturn( "alias" ); addGlobalPopup.onAliasInputChanged(); verify( view, times( 1 ) ).hideAliasValidationError(); }