From 0f8026cb46486d8788306424a9476876b93c8ab8 Mon Sep 17 00:00:00 2001 From: Luca Consalvi Date: Wed, 27 Nov 2024 16:48:03 +0100 Subject: [PATCH] fix test --- .../rtp/activator/configuration/CosmosDBConfigTest.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/test/java/it/gov/pagopa/rtp/activator/configuration/CosmosDBConfigTest.java b/src/test/java/it/gov/pagopa/rtp/activator/configuration/CosmosDBConfigTest.java index 6ec6f87..c45b270 100644 --- a/src/test/java/it/gov/pagopa/rtp/activator/configuration/CosmosDBConfigTest.java +++ b/src/test/java/it/gov/pagopa/rtp/activator/configuration/CosmosDBConfigTest.java @@ -27,6 +27,8 @@ class CosmosDBConfigTest { void setUp() { lenient().when(cosmosPropertiesConfig.getDatabase()).thenReturn("test-db"); lenient().when(cosmosPropertiesConfig.getUri()).thenReturn("https://test-endpoint:443/"); + lenient().when(cosmosPropertiesConfig.getKey()).thenReturn("keykey"); + } @Test @@ -36,9 +38,9 @@ void testGetDatabaseName() { } @Test - void testGetCosmosClientBuilder() { - CosmosClientBuilder builder = cosmosDBConfig.getCosmosClientBuilder(); + void testGetCosmosKeyAndUri() { + assertNotNull(cosmosDBConfig.getCosmosClientBuilder()); verify(cosmosPropertiesConfig).getUri(); - assertNotNull(builder); + verify(cosmosPropertiesConfig).getKey(); } }