@LocalData
public void testTriggerOnCommentAdded() throws Exception {
GerritServer gerritServer = PluginImpl.getInstance().getServer(PluginImpl.DEFAULT_SERVER_NAME);
gerritServer.getConfig().setCategories(Setup.createCodeReviewVerdictCategoryList());
FreeStyleProject project = DuplicatesUtil.createGerritTriggeredJobForCommentAdded(j, "projectX");
project.getBuildersList().add(new SleepBuilder(2000));
server.waitForCommand(GERRIT_STREAM_EVENTS, 2000);
CommentAdded firstEvent = Setup.createCommentAdded();
gerritServer.triggerEvent(firstEvent);
TestUtils.waitForBuilds(project, 1);
assertEquals(1, project.getLastCompletedBuild().getNumber());