use of org.folio.rest.impl.RequestsBatchAPI in project mod-circulation-storage by folio-org.
the class RequestBatchAPITest method willAbortBatchUpdateOnPopulateMetadataException.
@Test
public void willAbortBatchUpdateOnPopulateMetadataException() throws Exception {
CompletableFuture<TextResponse> postCompleted = new CompletableFuture<>();
new RequestsBatchAPI().postRequestStorageBatchRequests(null, null, result -> postCompleted.complete(new TextResponse(result.result().getStatus(), result.result().getEntity().toString())), null);
TextResponse response = postCompleted.get(5, TimeUnit.SECONDS);
assertThat(response.getStatusCode(), is(500));
assertThat(response.getBody(), containsString("Cannot populate metadata"));
}
Aggregations