### Question:
CopyPopupPresenter { public void save() { if (view.getNewTemplateName().trim().isEmpty()) { view.errorOnTemplateNameFromGroup(); return; } command.execute(view.getNewTemplateName()); } @Inject  CopyPopupPresenter(final View view); @PostConstruct void init(); View getView(); void copy(final ParameterizedCommand<String> command); void errorDuringProcessing(final String message); void save(); void hide();  }### Answer:
@Test public void testCopyError() { when( view.getNewTemplateName() ).thenReturn( "" ); presenter.save(); verify( view ).errorOnTemplateNameFromGroup(); }