AddGlobalPopup implements AddGlobalPopupView.Presenter { public String getAlias() { return view.getInsertedAlias(); } @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 getAlias() { when( view.getInsertedAlias() ).thenReturn( "alias" ); String aliasResult = addGlobalPopup.getAlias(); assertEquals( "alias", aliasResult ); }