From ed34dac681fca15d2a90aa3033e88b9098cc6fb8 Mon Sep 17 00:00:00 2001 From: saba_zedginidze Date: Mon, 26 Aug 2024 17:33:28 +0400 Subject: [PATCH] [MODINVSTOR-1243] Attempt increase coverage --- src/test/java/api/items/TenantItemApiTests.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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)