### Question:
GitUrlsPresenter { public void setSelectedProtocol(final String selectedProtocol) { this.selectedProtocol = selectedProtocol; update(); } @Inject  GitUrlsPresenter(final View view,
                            final Event<NotificationEvent> notificationEventEvent,
                            final TranslationService translationService,
                            final Clipboard clipboard); @PostConstruct void init(); void setup(final List<GitUrl> gitUrls); void setSelectedProtocol(final String selectedProtocol); void copyToClipboard(final HTMLInputElement element); View getView();  }### Answer:
@Test public void testSetSelectedProtocol() { final GitUrl gitUrl = new GitUrl("git", "git-url"); final GitUrl sshUrl = new GitUrl("ssh", "ssh-url"); presenter.setup(Arrays.asList(gitUrl, sshUrl)); presenter.setSelectedProtocol("git"); verify(presenter, times(2)).update(); assertEquals("git", presenter.selectedProtocol); assertEquals(2, presenter.gitUrlsByProtocol.size()); assertEquals(gitUrl, presenter.gitUrlsByProtocol.get("git")); assertEquals(sshUrl, presenter.gitUrlsByProtocol.get("ssh")); }