+
Contract.make {
+ request {
+ method 'GET'
+ url("/foo")
+ }
+ response {
+ status 200
+ body(events: [[
+ operation : 'EXPORT',
+ eventId : '16f1ed75-0bcc-4f0d-a04d-3121798faf99',
+ status : 'OK'
+ ], [
+ operation : 'INPUT_PROCESSING',
+ eventId : '3bb4ac82-6652-462f-b6d1-75e424a0024a',
+ status : 'OK'
+ ]
+ ]
+ )
+ testMatchers {
+ jsonPath('$.events[0].operation', byRegex('.+'))
+ jsonPath('$.events[0].eventId', byRegex('^([a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12})$'))
+ jsonPath('$.events[0].status', byRegex('.+'))
+ }
+ }
+}
+