Hi Team I am trying to write test for one of the s...
# pact-jvm
p
Hi Team I am trying to write test for one of the service using Junit, I am able to generate contract but when I hit the atual end point from pom.xml I am getting below This is my contract
Copy code
{
  "provider": {
    "name": "GetTokenServiceProvider"
  },
  "consumer": {
    "name": "GetTokenServicePConsumer"
  },
  "interactions": [
    {
      "description": "Pact JVM example Pact interaction",
      "request": {
        "method": "GET",
        "path": "/v1/orders/stickerId",
        "headers": {
          "Content-Type": "application/json"
        }
      },
      "response": {
        "status": 200,
        "headers": {
          "Content-Type": "application/json; charset=UTF-8"
        },
        "body": {
          "stickerId": "string"
        },
        "matchingRules": {
          "body": {
            "$.stickerId": {
              "matchers": [
                {
                  "match": "type"
                }
              ],
              "combine": "AND"
            }
          },
          "header": {
            "Content-Type": {
              "matchers": [
                {
                  "match": "regex",
                  "regex": "application/json(;\\s?charset=[\\w\\-]+)?"
                }
              ],
              "combine": "AND"
            }
          }
        },
        "generators": {
          "body": {
            "$.stickerId": {
              "type": "RandomString",
              "size": 20
            }
          }
        }
      },
      "providerStates": [
        {
          "name": ""
        }
      ]
    }
  ],
  "metadata": {
    "pactSpecification": {
      "version": "3.0.0"
    },
    "pact-jvm": {
      "version": "4.0.10"
    }
  }
}