handler = api.getHandler();
} catch (GerritTriggerException ex) {
fail(ex.getMessage());
}
assertNotNull(handler);
handler.post(Setup.createPatchsetCreated(gerritServerName));
TestUtils.waitForBuilds(project, 1);
FreeStyleBuild buildOne = project.getLastCompletedBuild();
assertSame(Result.SUCCESS, buildOne.getResult());
assertEquals(1, project.getLastCompletedBuild().getNumber());