@Test
public void testFreestyle() throws Exception {

    Job job = j.createFreeStyleProject("freestyle");
    login();
    Assert.assertEquals(
        get("/organizations/jenkins/pipelines/" + job.getFullName() + "/").get("disabled"),
        false
    );
    put("/organizations/jenkins/pipelines/" + job.getFullName() + "/disable", "{}");
    Assert.assertEquals(
        get("/organizations/jenkins/pipelines/" + job.getFullName() + "/").get("disabled"),
        true
    );
    put("/organizations/jenkins/pipelines/" + job.getFullName() + "/enable", "{}");
    Assert.assertEquals(
        get("/organizations/jenkins/pipelines/" + job.getFullName() + "/").get("disabled"),
        false
    );
}