String marker = "vyS0t2jHQe5qbcDggIeD50chS1SXwYMrkVKo0KHiTUjEYxBGCqRLKaiySzdN7QXGVVV5XZpNVG67pCZ_uykQXFMLaxOSu2hO_-5C0AtWMDrfo7LgVOyfnveDRuOSecUo3Ueq7K0";
int limit = 10000;
String startDate = "2013-12-04T21:25:42Z";
String endDate = "2013-12-05T21:25:42Z";
String format = "CSV";
InventoryRetrievalJobRequest job = InventoryRetrievalJobRequest.builder()
.format(format)
.endDate(endDate)
.startDate(startDate)
.limit(limit)
.marker(marker)
.build();
assertThat(client.initiateJob(VAULT_NAME, job)).isEqualTo(JOB_ID);
RecordedRequest request = server.takeRequest();
Json json = new GsonWrapper(new Gson());
job = json.fromJson(new String(request.getBody()), InventoryRetrievalJobRequest.class);
assertThat(job.getFormat()).isEqualTo(format);
assertThat(job.getParameters().getMarker()).isEqualTo(marker);
assertThat(job.getParameters().getLimit()).isEqualTo(limit);
assertThat(job.getParameters().getStartDate()).isEqualTo(startDate);
assertThat(job.getParameters().getEndDate()).isEqualTo(endDate);
assertThat(job.getType()).isEqualTo("inventory-retrieval");
assertEquals(request.getRequestLine(), "POST /-/vaults/examplevault/jobs HTTP/1.1");
}