code: protected Map<String, RequestResponsePact> getPacts(String fragment) {
        if (pacts == null) {
          pacts = new HashMap<>();
            for (Method m: target.getClass().getMethods()) {
                if (JUnitTestSupport.conformsToSignature(m) && methodMatchesFragment(m, fragment)) {
                    Pact pactAnnotation = m.getAnnotation(Pact.class);
                    if (StringUtils.isEmpty(pactAnnotation.provider()) || provider.equals(pactAnnotation.provider())) {
                        PactDslWithProvider dslBuilder = ConsumerPactBuilder.consumer(pactAnnotation.consumer())
                            .hasPactWith(provider);
                        updateAnyDefaultValues(dslBuilder);
                        try {
                          RequestResponsePact pact = (RequestResponsePact) m.invoke(target, dslBuilder);
                          pacts.put(provider, pact);
                        } catch (Exception e) {
                            throw new RuntimeException("Failed to invoke pact method", e);
                        }
                    }
                }
            }
        }
        return pacts;
    }
docs: scan all methods for @Pact annotation and execute them, if not already initialized
  @param fragment