  @Test
  public void canProcessTheJsonPayloadFromTheProvider() throws UnirestException {


    String date = "2013-08-16T15:31:20+1000";

    stubFor(get(urlPathEqualTo("/provider.json"))
      .withQueryParam("validDate", matching(".+"))
      .willReturn(aResponse()
        .withStatus(200)
        .withHeader("Content-Type", "application/json")
        .withBody("{\"test\": \"NO\", \"validDate\": \"" + date + "\", \"count\": 100}")));

    List<Object> data = new Client("http://localhost:8089").fetchAndProcessData(LocalDateTime.now().toString());

    assertThat(data, hasSize(2));
    assertThat(data.get(0), is(1));
    assertThat(data.get(1), is(equalTo(OffsetDateTime.parse(date, DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssXX")))));
  }