org.netbeans.modules.exceptions.entity.Exceptions exc =
em.find(org.netbeans.modules.exceptions.entity.Exceptions.class, excData.getSubmitId());
Report report = exc.getReportId();
report.setIssueId(issuezillaId);
em.merge(report);
Issue issue = BugReporterFactory.getDefaultReporter().getIssue(issuezillaId);
issue.setLastResolutionChange(new Date());
String undirectUser = "tester";
params.set(3, undirectUser);
params.set(6, undirectUser);
rec.setParameters(params.toArray());
task = new TestLogFileTask(em, log);
insertion = new DbInsertion(rec, thrown, task);
insertion.start(new ExceptionsData());
task.markFinished();
waitIssuezillaInsertionFinished();
result = handler.getResult();
assertNotNull("MANY DUPLICATES FILTER - ADD COMMENT", result);
parameters = result.getParameters();
assertEquals(Integer.toString(issuezillaId), parameters[0].toString());
assertEquals("default comment reporter", null, parameters[1]);
String str = (String) parameters[3];
assertNotNull("GENERATED MESSAGE", str);
assertTrue(str.contains("already"));
handler.flush();
issue.setIssueStatus("RESOLVED");
issue.setResolution("FIXED");
em.getTransaction().commit();
em.getTransaction().begin();
assertTrue(PersistenceUtils.issueIsFixed(issuezillaId));
assertFalse(PersistenceUtils.issueIsOpen(issuezillaId));