diff --git a/src/test/java/api/items/TenantItemApiTests.java b/src/test/java/api/items/TenantItemApiTests.java index cb740b2c5..aa1b813ed 100644 --- a/src/test/java/api/items/TenantItemApiTests.java +++ b/src/test/java/api/items/TenantItemApiTests.java @@ -72,8 +72,16 @@ private void createInstanceHoldingItem(ResourceClient itemStorageClient, Resourc InstanceApiClient.createInstance(okapiHttpClient, smallAngryPlanet(instanceId)); var holdingId = holdingsStorageClient.create(new HoldingRequestBuilder() .forInstance(instanceId)).getId(); - itemStorageClient.create(new ItemRequestBuilder().forHolding(holdingId) - .withBarcode(String.valueOf(Math.random() * 100))); + try { + var item = new ItemRequestBuilder().forHolding(holdingId) + .withBarcode(String.valueOf(Math.random() * 100)).create(); + System.err.println(item.toString()); + itemStorageClient.create(item); + } + catch (Exception e) { + e.printStackTrace(); + throw new RuntimeException(e); + } } private List getItems(OkapiHttpClient okapiHttpClient, int expected)