Contract.make {
  request {
    description('Get a list of all the attendees at a conference')
    method GET()
    url '/conference/1234/attendees'
    headers {
      contentType('application/json')
    }
  }
  response {
    status OK()
    headers {
      contentType('application/json')
    }
    body(
        value: [
            $(
                id: 123456,
                givenName: 'James',
                familyName: 'Gough'
            ),
            $(
                id: 123457,
                givenName: 'Matthew',
                familyName: 'Auburn'
            )
        ]
    )
  }
}





@Test
void response_for_attendees_should_be_200() {
    given()
        .header("Authorization", VALID_CREDENTIAL)
    .when()
        .get("/conference/conf-1/attendees")
    .then()
        .statusCode(HttpStatus.OK.value());
}
@Test
void response_for_attendees_should_be_403() {
    given()
        .header("Authorization", INVALID_CREDENTIAL)
    .when()
        .get("/conference/conf-1/attendees")
    .then()
        .statusCode(HttpStatus.FORBIDDEN.value());
...
}





{
    "values": [
        {
            "id":  123456,
            "givenName": "James",
            "familyName": "Gough"
        },
        {
            "id":  123457,
            "givenName": "Matthew",
            "familyNane": "Auburn"
        },
        {
            "id":  123456,
            "givenName": "Daniel",
            "familyName": "Bryant"
        }
    ]
}
