this is the state method for the provider test: ``...
# pact-jvm
u
this is the state method for the provider test:
Copy code
Map liveBasketExists(Map _ignored_params) {
        Map<String, Object> state = new HashMap<>();

        InternalBasket internalBasket =
                repository.createBasket(TestSupport.Repository.basketWithDefaults()).orElseThrow();

        // the key in this state-map corresponds to the variable in the expression in the consumer
        // test, i.e. in the
        // example consumer test we have a call like .pathFromProviderState("/${basketId}", ...)
        state.put("basketId", internalBasket.getBasketId());

        return state;
    }