@Test public void testReadProductReleaseBuildIds() throws Exception { String relativeUrl = "/product-releases/" + productReleaseId + "/distributed-build-records-ids"; stubFor( get(urlEqualTo(CONTEXT_URL + relativeUrl)) .willReturn( aResponse() .withHeader("Content-Type", "application/json") .withBody( readResponseBodyFromTemplate( "product-release-distributed-build-records-ids-1.json")))); Collection<Integer> ids = pncClient.findBuildIdsOfProductRelease(productReleaseId); assertArrayEquals(asList(1, 2).toArray(), ids.toArray()); }