### Question:
IssueReporter extends SahiReporter { void createIssue(final Issue issue) { try { for (Iterator<IssueCreator> iterator = listIssueCreator.iterator(); iterator.hasNext(); ) { IssueCreator issueCreator = (IssueCreator) iterator.next(); issueCreator.login(); issueCreator.createIssue(issue); issueCreator.logout(); } } catch (Exception e) { } } IssueReporter(final String suiteName); void addIssueCreator(final IssueCreator issueCreator); boolean createSuiteLogFolder(); void reportIssue(List<TestLauncher> tests);  }### Answer:
@Test public void testCreateIssue() { Mock mockIssueCreator = mock(IssueCreator.class); issueReporter = new IssueReporter("junit.suite"); issueReporter.addIssueCreator((IssueCreator) mockIssueCreator.proxy()); mockIssueCreator.expects(once()).method("login").withNoArguments(); mockIssueCreator.expects(once()).method("createIssue").with(isA(Issue.class)).after("login"); mockIssueCreator.expects(once()).method("logout").withNoArguments().after("createIssue"); issueReporter.createIssue(new Issue("", "")); }