use of org.folio.rest.support.builders.RequestRequestBuilder in project mod-circulation-storage by folio-org.
the class RequestsApiTest method createFailRequestsByUserProxyId.
@Test
public void createFailRequestsByUserProxyId() throws MalformedURLException, InterruptedException, ExecutionException, TimeoutException {
UUID requestId = UUID.randomUUID();
JsonObject j1 = new RequestRequestBuilder().withId(requestId).create();
j1.put("proxyUserId", "12345");
CompletableFuture<JsonResponse> createCompleted = new CompletableFuture<>();
client.post(requestStorageUrl(), j1, TENANT_ID, ResponseHandler.json(createCompleted));
JsonResponse postResponse = createCompleted.get(5, TimeUnit.SECONDS);
assertThat(String.format("Failed to create request: %s", postResponse.getBody()), postResponse.getStatusCode(), is(422));
}
Aggregations