Skip to content

Instantly share code, notes, and snippets.

@venkata-qa
Last active October 13, 2025 06:25
Show Gist options
  • Select an option

  • Save venkata-qa/6cc5a268fa1eed88d07e632f8a14663a to your computer and use it in GitHub Desktop.

Select an option

Save venkata-qa/6cc5a268fa1eed88d07e632f8a14663a to your computer and use it in GitHub Desktop.
import au.com.dius.pact.provider.junit5.*;
import au.com.dius.pact.provider.junit5.http.*;
import org.junit.jupiter.api.TestTemplate;
import org.junit.jupiter.api.extension.ExtendWith;
@Provider("booking-backend")
public class BookingServiceProviderPactTest {
@TestTemplate
@ExtendWith(PactVerificationInvocationContextProvider.class)
void pactVerificationTestTemplate(PactVerificationContext context) {
context.setTarget(new HttpsTestTarget(
"booking-dev.api.bupa.co.uk",
443,
"/booking"
));
context.verifyInteraction();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment