title: PACT: How to match specific dateTime format in pact jvm DSL?
body: <p>Using pact jvm DSL with spring boot (.timestamp(name, format, example) I can specify both:</p>
  <pre><code>.timestamp(&quot;start&quot;, &quot;dd-MM-yyyyy'T'HH:mm:ss'Z'&quot;, Instant.parse(&quot;2020-10-06T20:48:58.402Z&quot;))
  </code></pre>
  <p>and</p>
  <pre><code>.timestamp(&quot;start&quot;, &quot;yyyy-MM-dd'T'HH:mm:ss'Z'&quot;, Instant.parse(&quot;2020-10-06T20:48:58.402Z&quot;))
  </code></pre>
  <p>or even</p>
  <pre><code>.timestamp(&quot;start&quot;, &quot;dd-MM-yyyyyyy'T'HH:mm:ss'Z'&quot;, Instant.parse(&quot;2020-10-06T20:48:58.402Z&quot;))
  </code></pre>
  <p>and the test still passes.</p>
  <p>My real provider service errors if you send the date <strong>dd-MM-yyyy</strong> rather than <strong>yyyy-MM-dd</strong>, but I can't figure out how you're supposed to get the test on the consumer side to fail when it incorrectly sends the wrong format JSON timestamp to the provider API.</p>
  <p>I.e. the bit that looks like this:</p>
  <pre><code>    @Test
      @PactTestFor(pactMethod = &quot;postTheThing&quot;)
      public void pactWithProvider() {
        client.makeApiCall(testPayload);
      }
  </code></pre>