@Test
public void getSamplingTargets() throws Exception {

    stubFor(any(anyUrl()).willReturn(aResponse()
                                             .withStatus(200)
                                             .withBody(SAMPLING_TARGETS)));
    GetSamplingTargetsRequest request = new GetSamplingTargetsRequest()
        .withSamplingStatisticsDocuments(new SamplingStatisticsDocument().withClientID("client-id"));
    GetSamplingTargetsResult result = client.getSamplingTargets(request);
    GetSamplingTargetsResult expected = OBJECT_MAPPER.readValue(SAMPLING_TARGETS, GetSamplingTargetsResult.class);
    assertThat(expected).isEqualTo(result);
    verify(postRequestedFor(urlEqualTo("/SamplingTargets"))
                   .withHeader("Content-Type", equalTo("application/json"))
                   .withRequestBody(equalToJson("{"
                                                + " \"SamplingStatisticsDocuments\": ["
                                                + "    {"
                                                + "      \"ClientID\": \"client-id\""
                                                + "    }"
                                                + " ] "
                                                + "}")));
}