gabriel-farache commented on code in PR #3960:
URL:
https://github.com/apache/incubator-kie-kogito-runtimes/pull/3960#discussion_r2156643240
##########
api/kogito-api/src/test/java/org/kie/kogito/internal/utils/CaseInsentitiveSetTest.java:
##########
@@ -0,0 +1,33 @@
+package org.kie.kogito.internal.utils;
+
+import java.util.Set;
+
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+public class CaseInsentitiveSetTest {
+
+ private Set<String> set;
+
+ @BeforeEach
+ void setup() {
+ set = new CaseInsensitiveSet("Content-Length");
+ }
+
+ @Test
+ void testRegular() {
+ final String lowerCase = "content-length";
+ assertThat(set.add(null)).isTrue();
+ assertThat(set.add(lowerCase)).isFalse();
+ assertThat(set.add(null)).isFalse();
+ assertThat(set).hasSize(2);
+ assertThat(set.contains(lowerCase)).isTrue();
Review Comment:
Could you add
```
assertThat(set.contains("Content-Length")).isTrue();
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]