A given statement declares the provider state that must exist before a Pact interaction runs. It turns a prerequisite into a named setup condition the provider can use to prepare test data. section 5.2
Movie API interaction
For a GET request to /movies, .given("a movie exists") tells the provider to create movie data before exercising the interaction. The statement is followed by the request description, path, and HTTP method. section 5.2
Figure 5.4 The Pact contract builder to be passed to the provider includes the given data upon receiving the HTTP request, URL path, and HTTP method.
The interaction builder places the given data before the request description, URL path, and HTTP method. section 5.2
