From b442d5bd99de6ee606c1910fc25c15f894ef6e8a Mon Sep 17 00:00:00 2001 From: Sina Madani Date: Fri, 20 Oct 2023 10:29:34 +0100 Subject: [PATCH] 100% coverage on ProactiveConnect --- .../proactiveconnect/ProactiveConnectClientTest.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/test/java/com/vonage/client/proactiveconnect/ProactiveConnectClientTest.java b/src/test/java/com/vonage/client/proactiveconnect/ProactiveConnectClientTest.java index cb2f20552..42ec04044 100644 --- a/src/test/java/com/vonage/client/proactiveconnect/ProactiveConnectClientTest.java +++ b/src/test/java/com/vonage/client/proactiveconnect/ProactiveConnectClientTest.java @@ -19,6 +19,7 @@ import com.vonage.client.ClientTest; import com.vonage.client.RestEndpoint; import com.vonage.client.VonageClientException; +import com.vonage.client.VonageUnexpectedException; import com.vonage.client.common.HalLinks; import com.vonage.client.common.HalPageResponse; import com.vonage.client.common.HttpMethod; @@ -432,8 +433,7 @@ public void testDeleteListItem() throws Exception { @Test public void testDownloadListItems() throws Exception { String stub = ""; - String parsed = stubResponseAndGet(stub, () -> client.downloadListItems(SAMPLE_LIST_ID)); - assertEquals(stub, parsed); + assertEquals(stub, stubResponseAndGet(stub, () -> client.downloadListItems(SAMPLE_LIST_ID))); stubResponseAndAssertThrows(stub, () -> client.downloadListItems(null), NullPointerException.class ); @@ -445,6 +445,9 @@ public void testDownloadListItems() throws Exception { fileContents = Files.readAllBytes(SAMPLE_CSV_PATH); assertEquals(stub, new String(fileContents)); + stubResponseAndAssertThrows(stub, () -> + client.downloadListItems(SAMPLE_LIST_ID, Paths.get("/")), VonageUnexpectedException.class + ); stubResponseAndAssertThrows(stub, () -> client.downloadListItems(SAMPLE_LIST_ID, null), NullPointerException.class );