You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2023/01/10 10:39:49 UTC
[camel] 02/02: (chores) camel-caffeine: use a more strict assert for equality check in the load producer test
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 833c4340af75a02f9ce057253ed34c71d98b0325
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Tue Jan 10 09:31:29 2023 +0100
(chores) camel-caffeine: use a more strict assert for equality check in the load producer test
---
.../component/caffeine/loadcache/CaffeineLoadCacheProducerTest.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/components/camel-caffeine/src/test/java/org/apache/camel/component/caffeine/loadcache/CaffeineLoadCacheProducerTest.java b/components/camel-caffeine/src/test/java/org/apache/camel/component/caffeine/loadcache/CaffeineLoadCacheProducerTest.java
index 3a052246656..806c3bf495c 100644
--- a/components/camel-caffeine/src/test/java/org/apache/camel/component/caffeine/loadcache/CaffeineLoadCacheProducerTest.java
+++ b/components/camel-caffeine/src/test/java/org/apache/camel/component/caffeine/loadcache/CaffeineLoadCacheProducerTest.java
@@ -32,6 +32,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertSame;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class CaffeineLoadCacheProducerTest extends CaffeineLoadCacheTestSupport {
@@ -94,7 +95,7 @@ public class CaffeineLoadCacheProducerTest extends CaffeineLoadCacheTestSupport
final Map<String, String> elements = getTestCache().getAllPresent(keys);
keys.forEach(k -> {
assertTrue(elements.containsKey(k));
- assertEquals(map.get(k), elements.get(k));
+ assertSame(map.get(k), elements.get(k));
});
MockEndpoint.assertIsSatisfied(context);
@@ -145,7 +146,7 @@ public class CaffeineLoadCacheProducerTest extends CaffeineLoadCacheTestSupport
final Map<String, String> elements = mock.getExchanges().get(0).getIn().getBody(Map.class);
keys.forEach(k -> {
assertTrue(elements.containsKey(k));
- assertEquals(map.get(k), elements.get(k));
+ assertSame(map.get(k), elements.get(k));
});
}