@Test
public void shouldFailOnValidation2() throws Exception {

    User user = login();
    this.jwtToken = getJwtToken(j.jenkins, user.getId(), user.getId());
    Map<String,Object> resp = post("/organizations/" + getOrgName() + "/pipelines/",
            ImmutableMap.of("name", "demo",
                    "$class", "io.jenkins.blueocean.blueocean_git_pipeline.GitPipelineCreateRequest"
            ), 400);
    assertEquals(resp.get("code"), 400);
    List<Map> errors = (List<Map>) resp.get("errors");
    assertEquals("scmConfig", errors.get(0).get("field"));
    assertEquals("MISSING", errors.get(0).get("code"));
    assertNull(getOrgRoot().getItem("demo"));
}