* @throws IOException if so
* @throws InterruptedException if so.
*/
public void testIt() throws IOException, InterruptedException {
jenkins.setCrumbIssuer(null);
GerritServer server1 = new GerritServer(PluginImpl.DEFAULT_SERVER_NAME);
PluginImpl.getInstance().addServer(server1);
Config config = (Config)server1.getConfig();
config.setGerritFrontEndURL(this.getURL().toString() + "gerrit/");
config.setUseRestApi(true);
config.setGerritHttpUserName("user");
config.setGerritHttpPassword("passwd");
config.setRestCodeReview(true);
config.setRestVerified(true);
server1.start();
PatchsetCreated event = Setup.createPatchsetCreated(server1.getName());
FreeStyleProject project = createFreeStyleProject();
GerritTrigger trigger = Setup.createDefaultTrigger(project);
trigger.setGerritProjects(Collections.singletonList(
new GerritProject(CompareType.PLAIN, event.getChange().getProject(),