Map<String,Object> resp = post("/organizations/jenkins/pipelines/",
ImmutableMap.of("name", "demo",
</BUG>
"$class", "io.jenkins.blueocean.blueocean_git_pipeline.GitPipelineCreateRequest",
"scmConfig", ImmutableMap.of("uri", sampleRepo.fileUrl())
<BUG>), 201);
Assert.assertEquals("demo", resp.get("name"));</BUG>
}
@Test
public void simpleOrgShouldFailOnValidation1(){

Map<String,Object> resp = post("/organizations/jenkins/pipelines/",
ImmutableMap.of(
"scmConfig", ImmutableMap.of("uri", sampleRepo.fileUrl())
), 400);
Assert.assertEquals(resp.get("code"), 400);
List<Map> errors = (List<Map>) resp.get("errors");
Assert.assertEquals(errors.get(0).get("field"), "name");
Assert.assertEquals(errors.get(0).get("code"), "MISSING");
Assert.assertEquals(errors.get(1).get("field"), "$class");
Assert.assertEquals(errors.get(1).get("code"), "MISSING");
}
@Test
public void simpleOrgShouldFailOnValidation2(){
