public static PactDslJsonRootValue valueFromProviderState(String expression, Object example) {
    PactDslJsonRootValue value = new PactDslJsonRootValue();
    value.generators.addGenerator(Category.BODY, "", new ProviderStateGenerator(expression));
    value.setValue(example);
    return value;
  }
public static PactDslJsonRootValue valueFromProviderState ( String expression , Object example ) { PactDslJsonRootValue value = new PactDslJsonRootValue ( ) ; value . generators . addGenerator ( Category . BODY , "" , new ProviderStateGenerator ( expression ) ) ; value . setValue ( example ) ; return value ; }
Adds a value that will have it's value injected from the provider state
@param expression Expression to be evaluated from the provider state
@param example Example value to be used in the consumer test